Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

IMPORT ERROR when importing from sklearn.ensemble?

I received an import error when importing the HistGradientBooostingClassifier from sklearn.ensemble

I typed in jupyter notebook:

‘from sklearn.ensemble import HistGradientBoostingClassifier’

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

screenshot of the error.

>Solution :

The first result from a (US) Google search for ImportError from sklearn.ensemble import HistGradientBoostingClassifier is this issue from the scikit-learn repo on Github.

HistGradientBoostingRegressor is experimental. You need to enable experimental features first:

from sklearn.experimental import enable_hist_gradient_boosting
from sklearn.ensemble import HistGradientBoostingRegressor
Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading