effect_importance | R Documentation |
Extracts from an "EffectData" object a simple variable importance measure, namely
the (bin size weighted) variance of the partial dependence values, or of any other
calculated statistic (e.g., "pred_mean" or "y_mean"). It can be used via
update.EffectData(, sort_by = "pd")
to sort the variables in decreasing importance.
Note that this measure captures only the main effect strength.
If the importance is calculated with respect to "pd", it is closely related
to the suggestion of Greenwell et al. (2018).
effect_importance(x, by = NULL)
x |
Object of class "EffectData". |
by |
The statistic used to calculate the variance for.
One of 'pd', 'pred_mean', 'y_mean', 'resid_mean', or 'ale' (if available).
The default is |
A named vector of importance values of the same length as x
.
Greenwell, Brandon M., Bradley C. Boehmke, and Andrew J. McCarthy. 2018. A Simple and Effective Model-Based Variable Importance Measure. arXiv preprint. https://arxiv.org/abs/1805.04755.
update.EffectData()
fit <- lm(Sepal.Length ~ ., data = iris)
M <- feature_effects(fit, v = colnames(iris)[-1], data = iris)
effect_importance(M)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.