From e6a142fe7036a1d49497e2edf0f1d6fa26b888b9 Mon Sep 17 00:00:00 2001 From: Jiaming Yuan Date: Fri, 15 Oct 2021 06:30:46 +0800 Subject: [PATCH] Fix document about best_iteration (#7324) --- doc/python/python_intro.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/python/python_intro.rst b/doc/python/python_intro.rst index e025d367c..a93439925 100644 --- a/doc/python/python_intro.rst +++ b/doc/python/python_intro.rst @@ -203,7 +203,7 @@ If early stopping is enabled during training, you can get predictions from the b .. code-block:: python - ypred = bst.predict(dtest, iteration_range=(0, bst.best_iteration)) + ypred = bst.predict(dtest, iteration_range=(0, bst.best_iteration + 1)) Plotting --------