bl_imp.GeDSboost | R Documentation |
S3 method for GeDSboost-class
objects that calculates the
in-bag risk reduction ascribable to each base-learner of an FGB-GeDS model.
Essentially, it measures and aggregates the decrease in the empirical risk
attributable to each base-learner for every time it is selected across the
boosting iterations. This provides a measure on how much each base-learner
contributes to the overall improvement in the model's accuracy, as reflectedp
by the decrease in the empiral risk (loss function). This function is adapted
from varimp
and is compatible with the available
mboost-package
methods for varimp
,
including plot
, print
and as.data.frame
.
## S3 method for class 'GeDSboost'
bl_imp(object, boosting_iter_only = FALSE, ...)
object |
an object of class |
boosting_iter_only |
logical value, if |
... |
potentially further arguments. |
See varimp
for details.
An object of class varimp
with available plot
,
print
and as.data.frame
methods.
Hothorn T., Buehlmann P., Kneib T., Schmid M. and Hofner B. (2022). mboost: Model-Based Boosting. R package version 2.9-7, https://CRAN.R-project.org/package=mboost.
library(GeDS)
library(TH.data)
set.seed(290875)
data("bodyfat", package = "TH.data")
data = bodyfat
Gmodboost <- NGeDSboost(formula = DEXfat ~ f(hipcirc) + f(kneebreadth) + f(anthro3a),
data = data, initial_learner = FALSE)
MSE_Gmodboost_linear <- mean((data$DEXfat - Gmodboost$predictions$pred_linear)^2)
MSE_Gmodboost_quadratic <- mean((data$DEXfat - Gmodboost$predictions$pred_quadratic)^2)
MSE_Gmodboost_cubic <- mean((data$DEXfat - Gmodboost$predictions$pred_cubic)^2)
# Print MSE
cat("\n", "MEAN SQUARED ERROR", "\n",
"Linear NGeDSboost:", MSE_Gmodboost_linear, "\n",
"Quadratic NGeDSboost:", MSE_Gmodboost_quadratic, "\n",
"Cubic NGeDSboost:", MSE_Gmodboost_cubic, "\n")
# Base Learner Importance
bl_imp <- bl_imp(Gmodboost)
print(bl_imp)
plot(bl_imp)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.