xgbConfig: Set and get global configuration

Description Usage Arguments Value Examples

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

1
2
3

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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
# 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)

xgboost documentation built on April 22, 2021, 5:06 p.m.