diff --git a/python-package/xgboost/callback.py b/python-package/xgboost/callback.py index b4264cd82..14b4aef60 100644 --- a/python-package/xgboost/callback.py +++ b/python-package/xgboost/callback.py @@ -209,6 +209,10 @@ def early_stop(stopping_rounds, maximize=False, verbose=True): state['best_score'] = float('-inf') else: state['best_score'] = float('inf') + msg = '[%d]\t%s' % ( + env.iteration, + '\t'.join([_fmt_metric(x) for x in env.evaluation_result_list])) + state['best_msg'] = msg if bst is not None: if bst.attr('best_score') is not None: