Add configuration to R interface. (#5217)

* Save and load internal parameter configuration as JSON.
This commit is contained in:
Jiaming Yuan
2020-02-16 03:01:58 +08:00
committed by GitHub
parent 8ca9744b07
commit ed2465cce4
8 changed files with 114 additions and 2 deletions

View File

@@ -102,7 +102,7 @@ comments in the script for more details.
Saving and Loading the internal parameters configuration
********************************************************
XGBoost's ``C API`` and ``Python API`` supports saving and loading the internal
XGBoost's ``C API``, ``Python API`` and ``R API`` support saving and loading the internal
configuration directly as a JSON string. In Python package:
.. code-block:: python
@@ -111,6 +111,14 @@ configuration directly as a JSON string. In Python package:
config = bst.save_config()
print(config)
or
.. code-block:: R
config <- xgb.config(bst)
print(config)
Will print out something similiar to (not actual output as it's too long for demonstration):
.. code-block:: json