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 Oct 9, 2017
1 parent 7dc4002 commit 4d5bf8f
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 4d5bf8f

Please sign in to comment.