fit_xgboost {drape}R Documentation

Fit pre-tuned XGBoost regression for use in simulations.

Description

Fit pre-tuned XGBoost regression for use in simulations.

Usage

fit_xgboost(X, y, params, derivative = FALSE)

Arguments

X

matrix of covariates.

y

vector of responses.

params

XGBoost hyperparameters.

derivative

logical determining if numerical difference derivative estimate (wrt the first predictor) should also be returned.

Value

list containing a function "fit" which takes matrix input of the same width as X, and returns a vector of predictions. Optionally the list also contains a function "deriv_fit" for numerical difference derivative estimates.


[Package drape version 0.0.1 Index]