Fits a gradient boosted tree model using the XGBoost implementation.
fit_xgb(
formula,
data,
params = list(max_depth = 3, eta = 0.01, objective = "reg:squarederror"),
nrounds = 1000,
nthread = -1,
...
)
An object of class formula
with a symbolic description
of the model to be fitted.
A data.frame
containing the variables in the model.
A list of XGBoost parameters including:
max_depth
- Maximum tree depth
eta
- Learning rate
objective
- Loss function to optimize
Maximum number of boosting iterations.
Number of parallel threads used (-1 for all cores).
Additional parameters passed to xgboost::xgboost
.
A list containing two data frames:
metrics
- Model performance metrics
coefficients
- Feature importance measures