Skip to content

Commit

Permalink
Merge pull request dmlc#492 from Far0n/patch-1
Browse files Browse the repository at this point in the history
bugfix evals_result regex
  • Loading branch information
tqchen committed Sep 14, 2015
2 parents b1c94c7 + 0406c64 commit bda3282
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion python-package/xgboost/training.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ def train(params, dtrain, num_boost_round=10, evals=(), obj=None, feval=None,
sys.stderr.write(msg + '\n')

if evals_result is not None:
res = re.findall(":-([0-9.]+).", msg)
res = re.findall(":-?([0-9.]+).", msg)
for key, val in zip(evals_name, res):
evals_result[key].append(val)

Expand Down

0 comments on commit bda3282

Please sign in to comment.