Update to work with latest scikit-learn (0.22.1)
Closed this issue · 0 comments
randomir commented
When run with the latest version (scikit-learn==0.22.1
), the demo fails with:
$ python demo.py --mnist
======================================
Train#: 3333, Test: 1667
Num weak classifiers: 35
Tree depth: 3
Traceback (most recent call last):
File "demo.py", line 196, in <module>
clfs = train_model(X_train, y_train, X_test, y_test, 1.0)
File "demo.py", line 80, in train_model
X_train = centerer.fit_transform(X_train)
File "/usr/local/lib/python3.7/site-packages/sklearn/base.py", line 571, in fit_transform
return self.fit(X, **fit_params).transform(X)
File "/usr/local/lib/python3.7/site-packages/sklearn/preprocessing/_data.py", line 2033, in fit
.format(K.shape[0], K.shape[1]))
ValueError: Kernel matrix must be a square matrix. Input is a 3333x784 matrix.