Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

incompatiable with Scikit-learn V0.24.2 #351

Closed
kgmat opened this issue Jun 7, 2021 · 2 comments
Closed

incompatiable with Scikit-learn V0.24.2 #351

kgmat opened this issue Jun 7, 2021 · 2 comments
Assignees

Comments

@kgmat
Copy link

kgmat commented Jun 7, 2021

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

@parayamelo
Copy link

Same here, scikit-learn is already in version 1.0, there is no foreseable change?

@NasGit3
Copy link

NasGit3 commented Oct 7, 2021

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.

@shankarpandala shankarpandala self-assigned this Dec 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants