Data Science Asked by Chong Lip Phang on January 8, 2021
According to the documentation of Scikit-Learn Gradient Boosting Regressor:
init: estimator or ‘zero’, default=None: An estimator object that is used to compute the initial predictions. init has to provide fit and predict. If ‘zero’, the initial raw predictions are set to zero. By default a DummyEstimator is used, predicting either the average target value (for loss=’ls’), or a quantile for the other losses.
So what quantile is used for the DummyRegressor if the loss function is ‘huber’? Is it the 50-quantile, ie. median?
I need this information because I am reconstructing the predictor for the Gradient Boosting Regressor for use in another software environment.
Yes, a GBM with Huber loss initializes with the median. The relevant bit of code is the method init_estimator
of the loss class, in the file _gb_losses.py
. For HuberLossFunction
:
def init_estimator(self):
return DummyRegressor(strategy='quantile', quantile=.5)
(source)
Correct answer by Ben Reiniger on January 8, 2021
Get help from others!
Recent Answers
Recent Questions
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP