Skip to content

Commit

Permalink
python: always assign best_score after train (#890)
Browse files Browse the repository at this point in the history
This commit will regain backward compatibility that has been broken
after 015c8ff.
  • Loading branch information
henry0312 authored and guolinke committed Sep 6, 2017
1 parent db8b6b0 commit de0c174
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion python-package/lightgbm/sklearn.py
Original file line number Diff line number Diff line change
Expand Up @@ -452,7 +452,8 @@ def get_meta_data(collection, i):

if early_stopping_rounds is not None:
self._best_iteration = self._Booster.best_iteration
self._best_score = self._Booster.best_score

self._best_score = self._Booster.best_score

# free dataset
self.booster_.free_dataset()
Expand Down

0 comments on commit de0c174

Please sign in to comment.