Add configuration to R interface. (#5217)
* Save and load internal parameter configuration as JSON.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user