Description Usage Arguments Details Value Examples
View source: R/gbt.importance.R
gbt.importance
creates a data.frame
of feature importance in a model
1 | gbt.importance(feature_names, object)
|
feature_names |
character vector of feature names |
object |
object or pointer to object of class |
Sums up "expected reduction" in generalization loss (scaled using learning_rate
)
at each node for each tree in the model, and attributes it to
the feature the node is split on. Returns result in terms of percents.
data.frame
with percentwise reduction in loss of total attributed to each feature.
1 2 3 4 5 6 7 | ## Load data
data(caravan.train, package = "agtboost")
train <- caravan.train
mod <- gbt.train(train$y, train$x, loss_function = "logloss", verbose=10)
feature_names <- colnames(train$x)
imp <- gbt.importance(feature_names, mod)
imp
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.