Skip to content

Commit

Permalink
Add JSON dump functionality documentation (#3600)
Browse files Browse the repository at this point in the history
  • Loading branch information
grace-lam authored and hcho3 committed Sep 5, 2018
1 parent 324f3b5 commit dd1fda4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion demo/binary_classification/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ After training, we can use the output model to get the prediction of the test da
For binary classification, the output predictions are probability confidence scores in [0,1], corresponds to the probability of the label to be positive.

#### Dump Model
This is a preliminary feature, so far only tree model support text dump. XGBoost can display the tree models in text files and we can scan the model in an easy way:
This is a preliminary feature, so only tree models support text dump. XGBoost can display the tree models in text or JSON files, and we can scan the model in an easy way:
```
../../xgboost mushroom.conf task=dump model_in=0002.model name_dump=dump.raw.txt
../../xgboost mushroom.conf task=dump model_in=0002.model fmap=featmap.txt name_dump=dump.nice.txt
Expand Down
4 changes: 4 additions & 0 deletions doc/parameter.rst
Original file line number Diff line number Diff line change
Expand Up @@ -361,6 +361,10 @@ The following parameters are only used in the console version of XGBoost

- Feature map, used for dumping model

* ``dump_format`` [default= ``text``] options: ``text``, ``json``

- Format of model dump file

* ``name_dump`` [default= ``dump.txt``]

- Name of model dump file
Expand Down

0 comments on commit dd1fda4

Please sign in to comment.