我使用与原始版本具有完全相同形状的数据集更改了下面示例的 X 和颜色变量。
我收到以下错误:
C:\ProgramData\Anaconda3\lib\site-packages\scipy\linalg\decomp_lu.py:71: RuntimeWarning: Diagonal number 1 is exactly zero. Singular matrix.
RuntimeWarning)
Traceback (most recent call last):
File "C:\ProgramData\Anaconda3\lib\site-packages\sklearn\manifold\locally_linear.py", line 160, in null_space
v0=v0)
File "C:\ProgramData\Anaconda3\lib\site-packages\scipy\sparse\linalg\eigen\arpack\arpack.py", line 1605, in eigsh
params.iterate()
File "C:\ProgramData\Anaconda3\lib\site-packages\scipy\sparse\linalg\eigen\arpack\arpack.py", line 571, in iterate
raise ArpackError(self.info, infodict=self.iterate_infodict)
scipy.sparse.linalg.eigen.arpack.arpack.ArpackError: ARPACK error 3: No shifts could be applied during a cycle of the Implicitly restarted Arnoldi iteration. One possibility is to increase the size of NCV relative to NEV.
在处理上述异常的过程中,又出现了一个异常:
Traceback (most recent call last):
File "C:/Users/ylb17168/PycharmProjects/csd_test/test4.py", line 46, in <module>
method=method).fit_transform(X)
File "C:\ProgramData\Anaconda3\lib\site-packages\sklearn\manifold\locally_linear.py", line 666, in fit_transform
self._fit_transform(X)
File "C:\ProgramData\Anaconda3\lib\site-packages\sklearn\manifold\locally_linear.py", line 637, in _fit_transform
random_state=random_state, reg=self.reg, n_jobs=self.n_jobs)
File "C:\ProgramData\Anaconda3\lib\site-packages\sklearn\manifold\locally_linear.py", line 505, in locally_linear_embedding
tol=tol, max_iter=max_iter, random_state=random_state)
File "C:\ProgramData\Anaconda3\lib\site-packages\sklearn\manifold\locally_linear.py", line 168, in null_space
% msg)
ValueError: Error in determining null-space with ARPACK. Error message: 'ARPACK error 3: No shifts could be applied during a cycle of the Implicitly restarted Arnoldi iteration. One possibility is to increase the size of NCV relative to NEV. '. Note that method='arpack' can fail when the weight matrix is singular or otherwise ill-behaved. method='dense' is recommended. See online documentation for more information.
你能帮我找出问题吗?谢谢,齐德