coding style update (#2752)
* coding style update Current coding style varies(for example: the mixed use of single quote and double quote), and it will be confusing, especially for new users. This PR will try to follow proposal of PEP8, make the documents more readable. * minor fix
This commit is contained in:
parent
4cb2f7598b
commit
6e378452f2
@ -49,7 +49,7 @@ dtrain = xgb.DMatrix(csr)
|
||||
* Saving ```DMatrix``` into a XGBoost binary file will make loading faster:
|
||||
```python
|
||||
dtrain = xgb.DMatrix('train.svm.txt')
|
||||
dtrain.save_binary("train.buffer")
|
||||
dtrain.save_binary('train.buffer')
|
||||
```
|
||||
* Missing values can be replaced by a default value in the ```DMatrix``` constructor:
|
||||
```python
|
||||
@ -106,7 +106,7 @@ bst.dump_model('dump.raw.txt','featmap.txt')
|
||||
A saved model can be loaded as follows:
|
||||
```python
|
||||
bst = xgb.Booster({'nthread': 4}) # init model
|
||||
bst.load_model("model.bin") # load data
|
||||
bst.load_model('model.bin') # load data
|
||||
```
|
||||
|
||||
Early Stopping
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user