Learn R Programming

ddml (version 0.3.1)

mdl_xgboost: Wrapper for xgboost::xgboost().

Description

Simple wrapper for xgboost::xgboost() with some changes to the default arguments.

Usage

mdl_xgboost(y, X, nrounds = 500, verbosity = 0, ...)

Value

mdl_xgboost returns an object of S3 class mdl_xgboost

as a simple mask to the return object of xgboost::xgboost().

Arguments

y

The outcome variable.

X

The (sparse) feature matrix.

nrounds

Number of boosting iterations / rounds.

Note that the number of default boosting rounds here is not automatically tuned, and different problems will have vastly different optimal numbers of boosting rounds.

verbosity

Verbosity of printing messages. Valid values of 0 (silent), 1 (warning), 2 (info), and 3 (debug).

...

Additional arguments passed to xgboost. See xgboost::xgboost() for a complete list of arguments.

References

Chen T, Guestrin C (2011). "Xgboost: A Scalable Tree Boosting System." Proceedings of the 22nd ACM SIGKDD International Conference on Knowledge Discovery and Data Mining, 785–794.

See Also

xgboost::xgboost()

Other ml_wrapper: mdl_glm(), mdl_glmnet(), mdl_ranger(), ols()

Examples

Run this code
xgboost_fit <- mdl_xgboost(rnorm(50), matrix(rnorm(150), 50, 3),
                           nrounds = 1)
class(xgboost_fit)

Run the code above in your browser using DataLab