Closed j-mark-hou closed 7 years ago
@wxchan any ideas about this ? I feel like needing a test for this.
@j-mark-hou @guolinke init_score is only used for prediction now. It's not used in _lazy_init.
@wxchan I think it can be enabled in _lazy_init
is there an example / explanation somewhere for how this feature is supposed to work? Or maybe you can point me to some parts of the code where this is implemented?
Some objectives support "auto init score" with the boost_from_average option. I think that explicitly setting init_score should override auto init, but otherwise leave things as they are. I think I suggested something along that line in the code comments. It may suffice to just have ObtainAutomaticInitialScore first look for explicit init_score parameter otherwise proceed as before...
@j-mark-hou it's not working. you can add self.init_score=None
after https://github.com/Microsoft/LightGBM/blob/master/python-package/lightgbm/basic.py#L606 and self.set_init_score(self.init_score)
after https://github.com/Microsoft/LightGBM/blob/master/python-package/lightgbm/basic.py#L695 to see if it works.
refer to #1007
This issue has been automatically locked since there has not been any recent activity since it was closed. To start a new related discussion, open a new issue at https://github.com/microsoft/LightGBM/issues including a reference to this.
setting the init_score in an lgb.Dataset object doesn't appear to change anything. I expect that this should behave in a manner similar to xgboost's set_base_margin.
In particular, you can try training with two lgb.Dataset objects, one with set_init_score, and one without, and the results are identical. Tested with 'regression_l2' and 'poisson' objectives.
It also seems strange that 'init_score' appears nowhere in LightGBM/python-package/lightgbm/engine.py file.