Fix typo in Python Package Introduction (#2023)

Fixed #2016
This commit is contained in:
ANtlord 2017-02-09 12:35:13 +08:00 committed by Yuan (Terry) Tang
parent 4fb7fdb240
commit f054d812dc

View File

@ -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