Skip to contents

Function to include prior information as monotonic constrain to a extreme gradient descent boosting model engine_xgboost. Monotonic priors enforce directionality in direction of certain variables, however specifying a monotonic constrain does not guarantee that the variable is not regularized out during model fitting.

Usage

XGBPrior(variable, hyper = "increasing", ...)

# S4 method for character,character
XGBPrior(variable, hyper = "increasing", ...)

Arguments

variable

A character matched against existing predictors or latent effects.

hyper

A character object describing the type of constrain. Available options are 'increasing', 'decreasing', 'convex', 'concave', 'none'.

...

Variables passed on to prior object.

References

  • Chen, T., He, T., Benesty, M., Khotilovich, V., Tang, Y., & Cho, H. (2015). Xgboost: extreme gradient boosting. R package version 0.4-2, 1(4), 1-4.

Examples

if (FALSE) {
 pp <- XGBPrior("forest", "increasing")
}