Skip to content
This repository has been archived by the owner on Feb 28, 2024. It is now read-only.

from sklearn.ensemble.forest import RandomForestClassifier ModuleNotFoundError: No module named 'sklearn.ensemble.forest' #993

Closed
vishalediga8899 opened this issue Feb 5, 2021 · 4 comments
Labels
invalid Not a valid bug report. upstream Issue affects a dependency up the stack (sklearn, NumPy, Python, ...).

Comments

@vishalediga8899
Copy link

I am getting error like this, can any body plz help

@kernc
Copy link
Contributor

kernc commented Feb 5, 2021

Try:

from sklearn.ensemble import RandomForestClassifier

Is this supposed to be a bug in scikit-optimize? We don't import from sklearn.ensemble.forest anywhere.

@vishalediga8899
Copy link
Author

Brother it is again showing "in RanFor = pickle.load(f) ModuleNotFoundError: No module named 'sklearn.ensemble.forest'"
like this

@vishalediga8899

This comment has been minimized.

@kernc
Copy link
Contributor

kernc commented Feb 5, 2021

Without seeing any code, you seem to be trying to unpickle a model from a prior, over a year old version of scikit-learn, which defined RandomForestClassifier still in sklearn/ensemble/forest.py.

Unfortunately, scikit-learn's position on the matter is:

we don't support pickling/unpickling across different scikit-learn version

meaning you'll have to re-fit the model.

@kernc kernc closed this as completed Feb 5, 2021
@kernc kernc added invalid Not a valid bug report. upstream Issue affects a dependency up the stack (sklearn, NumPy, Python, ...). labels Feb 5, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
invalid Not a valid bug report. upstream Issue affects a dependency up the stack (sklearn, NumPy, Python, ...).
Projects
None yet
Development

No branches or pull requests

2 participants