Skip to content

Commit

Permalink
Preserve the actal objective used on the booster
Browse files Browse the repository at this point in the history
Save the actual objective used on xgboost.train.

Not saving it was giving problem in predict_proba, as issue  dmlc#1215
  • Loading branch information
KhaoticMind committed May 31, 2016
1 parent 6e34630 commit 19129b2
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions python-package/xgboost/sklearn.py
Expand Up @@ -441,6 +441,7 @@ def fit(self, X, y, sample_weight=None, eval_set=None, eval_metric=None,
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]
Expand Down

0 comments on commit 19129b2

Please sign in to comment.