我从Pyrcca软件包中收到此错误:
LinAlgError:“ b”的第46位前导未成年人不是正数 定。 'b'的分解无法完成并且没有 计算出特征值或特征向量。
它来自以下代码行:
cca.train([TCIA_train,TCGA_train])
稍后会调用此行:
r,Vs = eigh(LH,RH,eigvals =(maxCC-numCC,maxCC-1))
最终导致错误的原因。 我打印出来的值:
LH: [[ 0. 0. 0. ... -14.70181642 -11.97719127
-32.68404183]
[ 0. 0. 0. ... -5.00595616 8.23628459
-11.05749337]
[ 0. 0. 0. ... 42.09480915 12.11597276
29.5793337 ]
...
[-14.70181642 -5.00595616 42.09480915 ... 0. 0.
0. ]
[-11.97719127 8.23628459 12.11597276 ... 0. 0.
0. ]
[-32.68404183 -11.05749337 29.5793337 ... 0. 0.
0. ]]
RH: [[ 5.98249871e+03 5.28188061e+02 -3.75685403e+02 ... 0.00000000e+00
0.00000000e+00 0.00000000e+00]
[ 5.28188061e+02 3.84674934e+03 3.45817309e+02 ... 0.00000000e+00
0.00000000e+00 0.00000000e+00]
[-3.75685403e+02 3.45817309e+02 2.56407017e+03 ... 0.00000000e+00
0.00000000e+00 0.00000000e+00]
...
[ 0.00000000e+00 0.00000000e+00 0.00000000e+00 ... 6.00000000e+00
3.00000000e+00 1.00000000e+00]
[ 0.00000000e+00 0.00000000e+00 0.00000000e+00 ... 3.00000000e+00
7.00000000e+00 2.00000000e+00]
[ 0.00000000e+00 0.00000000e+00 0.00000000e+00 ... 1.00000000e+00
2.00000000e+00 5.00000000e+00]]