Scikit-learn: import error about `HistGradientBoostingRegressor`

Created on 24 Sep 2019  路  1Comment  路  Source: scikit-learn/scikit-learn

Description

import error

Steps/Code to Reproduce

from sklearn.ensemble import HistGradientBoostingRegressor

Expected Results

Actual Results

cmd from sklearn.ensemble import HistGradientBoostingRegressor ImportError: cannot import name 'HistGradientBoostingRegressor' from 'sklearn.ensemble'

Versions

win10 and ubuntu18.04
sklearn version is 0.20.1 and 0.21.1


I open this source code, can't find code about this function.

Most helpful comment

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

from sklearn.experimental import enable_hist_gradient_boosting
from sklearn.ensemble import HistGradientBoostingRegressor

>All comments

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

from sklearn.experimental import enable_hist_gradient_boosting
from sklearn.ensemble import HistGradientBoostingRegressor
Was this page helpful?
0 / 5 - 0 ratings