Thanks for sharing the source code of such a nice algorithm!
When I trying to use grid search in sklearn for LCE, I got the following error:
job exception: '>' not supported between instances of 'float' and 'dict'
Is there any suggestions for solving this issue please?
The code are listed as below:
from lce import LCEClassifier
from sklearn.datasets import load_iris
from sklearn.metrics import classification_report
from sklearn.model_selection import train_test_split
from sklearn.model_selection import GridSearchCV
import pandas as pd
Thanks for sharing the source code of such a nice algorithm! When I trying to use grid search in sklearn for LCE, I got the following error:
job exception: '>' not supported between instances of 'float' and 'dict'
Is there any suggestions for solving this issue please?
The code are listed as below:
from lce import LCEClassifier from sklearn.datasets import load_iris from sklearn.metrics import classification_report from sklearn.model_selection import train_test_split from sklearn.model_selection import GridSearchCV import pandas as pd
data = load_iris() X_train, X_test, y_train, y_test = train_test_split(data.data, data.target, random_state=0)
params = { 'n_estimators': list(range(100, 300, 100)) }
clf = LCEClassifier(n_jobs=2, random_state=0) grid_cv = GridSearchCV(clf, param_grid = params, cv = 5, n_jobs = 2) grid_cv.fit(X_train, y_train)