xgb.set.config, xgb.get.config {xgboost} | R Documentation |
Set and get global configuration
Description
Global configuration consists of a collection of parameters that can be applied in the global
scope. See https://xgboost.readthedocs.io/en/stable/parameter.html for the full list of
parameters supported in the global configuration. Use xgb.set.config
to update the
values of one or more global-scope parameters. Use xgb.get.config
to fetch the current
values of all global-scope parameters (listed in
https://xgboost.readthedocs.io/en/stable/parameter.html).
Usage
xgb.set.config(...)
xgb.get.config()
Arguments
... |
List of parameters to be set, as keyword arguments |
Value
xgb.set.config
returns TRUE
to signal success. xgb.get.config
returns
a list containing all global-scope parameters and their values.
Examples
# Set verbosity level to silent (0)
xgb.set.config(verbosity = 0)
# Now global verbosity level is 0
config <- xgb.get.config()
print(config$verbosity)
# Set verbosity level to warning (1)
xgb.set.config(verbosity = 1)
# Now global verbosity level is 1
config <- xgb.get.config()
print(config$verbosity)
[Package xgboost version 1.7.8.1 Index]