From f054d812dc8424446471ddc5ba2c903dd913d0e9 Mon Sep 17 00:00:00 2001 From: ANtlord Date: Thu, 9 Feb 2017 12:35:13 +0800 Subject: [PATCH] Fix typo in Python Package Introduction (#2023) Fixed #2016 --- doc/python/python_intro.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/python/python_intro.md b/doc/python/python_intro.md index 282da47d2..a4197d4d5 100644 --- a/doc/python/python_intro.md +++ b/doc/python/python_intro.md @@ -129,12 +129,12 @@ A model that has been trained or loaded can perform predictions on data sets. # 7 entities, each contains 10 features data = np.random.rand(7, 10) dtest = xgb.DMatrix(data) -ypred = bst.predict(xgmat) +ypred = bst.predict(dtest) ``` If early stopping is enabled during training, you can get predictions from the best iteration with `bst.best_ntree_limit`: ```python -ypred = bst.predict(xgmat,ntree_limit=bst.best_ntree_limit) +ypred = bst.predict(dtest,ntree_limit=bst.best_ntree_limit) ``` Plotting