lazypredict
lazypredict copied to clipboard
incompatiable with Scikit-learn V0.24.2
Hello,
Facing this issue.
lazypredict 0.2.9 requires scikit-learn==0.23.1, but you have scikit-learn 0.24.2 which is incompatible.
lazypredict has to be restricted to scikit older version?
thanks
Same here, scikit-learn is already in version 1.0, there is no foreseable change?
You are right; it is not compatible with sklearn V0.24.2. This is mainly because the location of some modules has been changed in sklearn and the required modifications have not been made to the source code in lazypredict. To fix these issues, you need to go to Supervised.py which is located at: /envs/<your_environment_name>/lib/python/site-packages/lazypredict/Supervised.py then change the errors one by one according to the documentation of sklearn V0.2.24. Here, I'm listing the modifications that I made. The error you get might be different than mine. But, as I said you should use the documentation of sklearn V0.2.24 to figure out the location of the new modules:
from sklearn.utils.testing import all_estimators to from sklearn.utils import all_estimators
sklearn.ensemble.gradient_boosting.GradientBoostingClassifier to sklearn.ensemble.GradientBoostingClassifier
sklearn.gaussian_process.gpc.GaussianProcessClassifier to sklearn.gaussian_process._gpc.GaussianProcessClassifier
sklearn.neural_network.multilayer_perceptron.MLPClassifier to sklearn.neural_network.MLPClassifier
sklearn.linear_model.logistic.LogisticRegressionCV to sklearn.linear_model.LogisticRegressionCV
sklearn.neighbors.classification.RadiusNeighborsClassifier to sklearn.neighbors.RadiusNeighborsClassifier
sklearn.ensemble.voting.VotingClassifier to sklearn.ensemble.VotingClassifier
removed_regressors = [('TheilSenRegressor', sklearn.linear_model.theil_sen.TheilSenRegressor), to removed_regressors = [('TheilSenRegressor', sklearn.linear_model.TheilSenRegressor),
Finally, from the "removed_regressors" list remove the following item: ('_SigmoidCalibration', sklearn.calibration._SigmoidCalibration)
Making these changes in Supervised.py fixed my problems. Hope it helps.