fit_xgboost: Fit pre-tuned XGBoost regression for use in simulations.

View source: R/regression_functions.R

fit_xgboostR 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.


drape documentation built on April 3, 2025, 9:23 p.m.