我已经在statsmodels中使用WLS(加权最小二乘回归)编写了级联增强分类器的算法,并且已经能够成功运行几次。我用了几百张图片,一切都很好。
但是,我现在用它来训练大约4000张图像的模型。 现在我收到以下错误:
MKL ERROR: Parameter 4 was incorrect on entry to DLASCL.
Traceback (most recent call last):
File "C:\Users\app\Documents\Python Scripts\gbc_carclassify.py", line 95, in <module>
gentlebooster.train(X_train,y_train,100)
File "C:\Users\app\Documents\Python Scripts\gentleboost_c_class.py", line 103, in train
temp_g = sm.WLS(y1, self.X, w).fit() # Step 2(a)(ii)
File "C:\Users\app\Anaconda\lib\site-packages\statsmodels\regression\linear_model.py", line 127, in fit
self.pinv_wexog = pinv_wexog = np.linalg.pinv(self.wexog)
File "C:\Users\app\Anaconda\lib\site-packages\numpy\linalg\linalg.py", line 1574, in pinv
u, s, vt = svd(a, 0)
File "C:\Users\app\Anaconda\lib\site-packages\numpy\linalg\linalg.py", line 1323, in svd
raise LinAlgError('SVD did not converge')
numpy.linalg.linalg.LinAlgError: SVD did not converge
可能是什么原因?我以前没见过这个消息:
MKL ERROR: Parameter 4 was incorrect on entry to DLASCL.
错误似乎是由这一行引起的:
temp_g = sm.WLS(y1, self.X, w).fit()