diff --git a/wrapper/xgboost.py b/wrapper/xgboost.py index 25ff8b1b2..5b38d2f2f 100644 --- a/wrapper/xgboost.py +++ b/wrapper/xgboost.py @@ -694,11 +694,11 @@ def train(params, dtrain, num_boost_round=10, evals=(), obj=None, feval=None, sys.stderr.write("Stopping. Best iteration:\n{}\n\n".format(best_msg)) bst.best_score = best_score bst.best_iteration = best_score_i - return bst - + break + bst.best_score = best_score + bst.best_iteration = best_score_i return bst - class CVPack(object): def __init__(self, dtrain, dtest, param): self.dtrain = dtrain