add doc for Python wrapper
This commit is contained in:
parent
b5c8085638
commit
bb91bdea84
@ -124,3 +124,8 @@ data = np.random.rand(7,10) # 7 entities, each contains 10 features
|
|||||||
dtest = xgb.DMatrix( data, missing = -999.0 )
|
dtest = xgb.DMatrix( data, missing = -999.0 )
|
||||||
ypred = bst.predict( xgmat )
|
ypred = bst.predict( xgmat )
|
||||||
```
|
```
|
||||||
|
|
||||||
|
If early stopping is enabled during training, you can predict with the best iteration.
|
||||||
|
```python
|
||||||
|
ypred = bst.predict(xgmat,ntree_limit=bst.best_iteration)
|
||||||
|
```
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user