LocalCascadeEnsemble / LCE

Random Forest or XGBoost? It is Time to Explore LCE
https://lce.readthedocs.io/
Apache License 2.0
67 stars 8 forks source link

Errors when using grid search in sklearn for LCE #6

Closed yunxiangz closed 2 years ago

yunxiangz commented 2 years ago

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)

LocalCascadeEnsemble commented 2 years ago

Hello,

Thank you for your message and I confirm that this issue has been corrected in the version 0.2.7.

Best,