Closed HoShilo closed 23 hours ago
Hi @HoShilo --
init_score is the right approach, and it gets added to the additive scores from the other features before applying the inverse link during prediction. If you had a more complicated model, then you would need to use the init_score on the predict function during prediction in addition to using it during fitting. For adding a constant basemargin though, I would just add that value to the intercept attribute on the EBM after fitting, which will have the same effect, but is simpler.
While training an EBM regressor/classifier, is it possible to integrate an offset variable as in GLM/GAM? By offset, I mean a fixed effect variable that is added to the additive formula. For instance, in XGBOOST, this is implemented with the
base_margin
argument.I looked into the
init_score
of thefit
method, but I don't think it serves the same purpose. From my understanding, it doesn't pass through the link function. It is easy to bypass this with identity or log link functions (just subtract or divide y before the fit by offset or exp(offset) respectively), but with classifiers (logit link), it is less straightforward how to approach this.