Preserve the actal objective used on the booster

Save the actual objective used on xgboost.train.

Not saving it was giving problem in predict_proba, as issue  #1215
This commit is contained in:
Antonio Augusto Santos 2016-05-31 19:01:10 -03:00
parent 6e3463097d
commit 19129b289c

View File

@ -441,6 +441,7 @@ class XGBClassifier(XGBModel, XGBClassifierBase):
evals_result=evals_result, obj=obj, feval=feval,
verbose_eval=verbose)
self.objective = xgb_options["objective"]
if evals_result:
for val in evals_result.items():
evals_result_key = list(val[1].keys())[0]