当前位置:   article > 正文

Exception: LinAlgError和Intel MKL ERROR: Parameter 6 was incorrect on entry to DGELSD【已解决】

intel mkl error: parameter 6 was incorrect on entry to dgelsd.

问题描述

运行程序,处理到某个数据时候报错:

  1. Exception has occurred: LinAlgError
  2. SVD did not converge in Linear Least Squares
  3. File "E:\matlab\CHB-MIT-DATA\epilepsy_eeg_classification\pyeeg.py", line 692, in hurst
  4. [m, c] = numpy.linalg.lstsq(A, R_S)[0]
  5. File "E:\matlab\CHB-MIT-DATA\epilepsy_eeg_classification\preprocessing.py", line 50, in eeg_features
  6. res[10] = pyeeg.hurst(data) # Hurst exponent
  7. File "E:\matlab\CHB-MIT-DATA\epilepsy_eeg_classification\preprocessing.py", line 88, in eeg_preprocessing
  8. features.extend(eeg_features(temp[i]).tolist())
  9. File "E:\matlab\CHB-MIT-DATA\epilepsy_eeg_classification\preprocessing.py", line 334, in <module>
  10. res = eeg_preprocessing(file, seizures)
  11. numpy.linalg.LinAlgError: SVD did not converge in Linear Least Squares

terminal报错如下:

  1. e:\matlab\CHB-MIT-DATA\epilepsy_eeg_classification\pyeeg.py:620: FutureWarning: `rcond` parameter will change to the default of machine precision times ``max(M, N)`` where M and N are the input matrix dimensions.
  2. To use the future default and silence this warning we advise to pass `rcond=None`, to keep using the old, explicitly pass `rcond=-1`.
  3. (p, _, _, _) = numpy.linalg.lstsq(x, L)
  4. e:\matlab\CHB-MIT-DATA\epilepsy_eeg_classification\pyeeg.py:688: RuntimeWarning: invalid value encountered in true_divide
  5. R_S = R_T / S_T
  6. e:\matlab\CHB-MIT-DATA\epilepsy_eeg_classification\pyeeg.py:692: FutureWarning: `rcond` parameter will change to the default of machine precision times ``max(M, N)`` where M and N are the input matrix dimensions.
  7. To use the future default and silence this warning we advise to pass `rcond=None`, to keep using the old, explicitly pass `rcond=-1`.
  8. [m, c] = numpy.linalg.lstsq(A, R_S)[0]
  9. Section 1 ; start: 0 ; stop: 2560
  10. Section 2 ; start: 256 ; stop: 2816
  11. Section 3 ; start: 512 ; stop: 3072
  12. Section 4 ; start: 768 ; stop: 3328
  13. Section 5 ; start: 1024 ; stop: 3584
  14. Section 6 ; start: 1280 ; stop: 3840
  15. Section 7 ; start: 1536 ; stop: 4096
  16. Section 8 ; start: 1792 ; stop: 4352
  17. Section 9 ; start: 2048 ; stop: 4608
  18. Section 10 ; start: 2304 ; stop: 4864
  19. Section 11 ; start: 2560 ; stop: 5120
  20. Section 12 ; start: 2816 ; stop: 5376
  21. Section 13 ; start: 3072 ; stop: 5632
  22. Section 14 ; start: 3328 ; stop: 5888
  23. Section 15 ; start: 3584 ; stop: 6144
  24. Section 16 ; start: 3840 ; stop: 6400
  25. Section 17 ; start: 4096 ; stop: 6656
  26. Section 18 ; start: 4352 ; stop: 6912
  27. Section 19 ; start: 4608 ; stop: 7168
  28. Section 20 ; start: 4864 ; stop: 7424
  29. Section 21 ; start: 5120 ; stop: 7680
  30. Section 22 ; start: 5376 ; stop: 7936
  31. Section 23 ; start: 5632 ; stop: 8192
  32. Section 24 ; start: 5888 ; stop: 8448
  33. Section 25 ; start: 6144 ; stop: 8704
  34. Section 26 ; start: 6400 ; stop: 8960
  35. Section 27 ; start: 6656 ; stop: 9216
  36. Section 28 ; start: 6912 ; stop: 9472
  37. Section 29 ; start: 7168 ; stop: 9728
  38. Section 30 ; start: 7424 ; stop: 9984
  39. Section 31 ; start: 7680 ; stop: 10240
  40. Section 32 ; start: 7936 ; stop: 10496
  41. Section 33 ; start: 8192 ; stop: 10752
  42. Section 34 ; start: 8448 ; stop: 11008
  43. Section 35 ; start: 8704 ; stop: 11264
  44. Section 36 ; start: 8960 ; stop: 11520
  45. Section 37 ; start: 9216 ; stop: 11776
  46. Intel MKL ERROR: Parameter 6 was incorrect on entry to DGELSD.
  47. Backend Qt5Agg is interactive backend. Turning interactive mode on.
  48. FutureWarning: `rcond` parameter will change to the default of machine precision times ``max(M, N)`` where M and N are the input matrix dimensions.
  49. To use the future default and silence this warning we advise to pass `rcond=None`, to keep using the old, explicitly pass `rcond=-1`.
  50. (p, _, _, _) = numpy.linalg.lstsq(x, L)
  51. e:\matlab\CHB-MIT-DATA\epilepsy_eeg_classification\pyeeg.py:688: RuntimeWarning: invalid value encountered in true_divide
  52. R_S = R_T / S_T
  53. e:\matlab\CHB-MIT-DATA\epilepsy_eeg_classification\pyeeg.py:692: FutureWarning: `rcond` parameter will change to the default of machine precision times ``max(M, N)`` where M and N are the input matrix dimensions.
  54. To use the future default and silence this warning we advise to pass `rcond=None`, to keep using the old, explicitly pass `rcond=-1`.

解决方案

方法1:

有人说numpy1.19.3在linux上起作用,numpy1.19.4在Windows上起作用。因此我把原来的numpy卸载,重装numpy1.19.4。

  1. pip uninstall numpy
  2. pip install numpy==1.19.4

 原来的numpy是1.21.5版本的。

python - LinAlgError:尝试 polyfit 时 SVD 未在线性最小二乘中收敛 - 堆栈内存溢出

安装1.19.4时候虽然报错了,但是成功安装:

  1. ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
  2. tensorflow 1.14.0 requires tensorflow-estimator<1.15.0rc0,>=1.14.0rc0, but you have tensorflow-estimator 2.4.0 which is incompatible.
  3. Successfully installed numpy-1.19.4

 我通过降低了numpy版本的方式解决了这个问题,不知道这个方法对你是否有借鉴意义。

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/小小林熬夜学编程/article/detail/96554
推荐阅读
相关标签
  

闽ICP备14008679号