* Add management functions for global configuration: XGBSetGlobalConfig(), XGBGetGlobalConfig(). * Add Python interface: set_config(), get_config(), and config_context(). * Add unit tests for Python * Add R interface: xgb.set.config(), xgb.get.config() * Add unit tests for R Co-authored-by: Jiaming Yuan <jm.yuan@outlook.com>
40 lines
1.3 KiB
R
40 lines
1.3 KiB
R
% Generated by roxygen2: do not edit by hand
|
|
% Please edit documentation in R/xgb.config.R
|
|
\name{xgb.set.config, xgb.get.config}
|
|
\alias{xgb.set.config, xgb.get.config}
|
|
\alias{xgb.set.config}
|
|
\alias{xgb.get.config}
|
|
\title{Set and get global configuration}
|
|
\usage{
|
|
xgb.set.config(...)
|
|
|
|
xgb.get.config()
|
|
}
|
|
\arguments{
|
|
\item{...}{List of parameters to be set, as keyword arguments}
|
|
}
|
|
\value{
|
|
\code{xgb.set.config} returns \code{TRUE} to signal success. \code{xgb.get.config} returns
|
|
a list containing all global-scope parameters and their values.
|
|
}
|
|
\description{
|
|
Global configuration consists of a collection of parameters that can be applied in the global
|
|
scope. See \url{https://xgboost.readthedocs.io/en/stable/parameter.html} for the full list of
|
|
parameters supported in the global configuration. Use \code{xgb.set.config} to update the
|
|
values of one or more global-scope parameters. Use \code{xgb.get.config} to fetch the current
|
|
values of all global-scope parameters (listed in
|
|
\url{https://xgboost.readthedocs.io/en/stable/parameter.html}).
|
|
}
|
|
\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)
|
|
}
|