Use double precision in metric calculation. (#7364)

This commit is contained in:
Jiaming Yuan
2021-11-02 12:00:32 +08:00
committed by GitHub
parent 239dbb3c0a
commit 0f7a9b42f1
11 changed files with 219 additions and 224 deletions

View File

@@ -1331,8 +1331,11 @@ def test_evaluation_metric():
)
clf.fit(X, y, eval_set=[(X, y)])
internal = clf.evals_result()
np.testing.assert_allclose(
custom["validation_0"]["merror"], internal["validation_0"]["merror"]
custom["validation_0"]["merror"],
internal["validation_0"]["merror"],
atol=1e-6
)
clf = xgb.XGBRFClassifier(