sklearn.experimental.enable_hist_gradient_boosting¶
Enables histogram-based gradient boosting estimators.
The API and results of these estimators might change without any deprecation cycle.
Importing this file dynamically sets the
sklearn.ensemble.HistGradientBoostingClassifier
and
sklearn.ensemble.HistGradientBoostingRegressor
as attributes of the
ensemble module:
>>> # explicitly require this experimental feature
>>> from sklearn.experimental import enable_hist_gradient_boosting # noqa
>>> # now you can import normally from ensemble
>>> from sklearn.ensemble import HistGradientBoostingClassifier
>>> from sklearn.ensemble import HistGradientBoostingRegressor
The # noqa
comment comment can be removed: it just tells linters like
flake8 to ignore the import, which appears as unused.