Print Generic for Feature Importance Object

# S3 method for feature_importance_explainer
print(x, ...)

Arguments

x

an explanation created with feature_importance

...

other parameters.

Value

a data frame.

References

Explanatory Model Analysis. Explore, Explain, and Examine Predictive Models. https://ema.drwhy.ai/

Examples

library("DALEX")
library("ingredients")

model_titanic_glm <- glm(survived ~ gender + age + fare,
                         data = titanic_imputed, family = "binomial")

explain_titanic_glm <- explain(model_titanic_glm,
                               data = titanic_imputed[,-8],
                               y = titanic_imputed[,8],
                               verbose = FALSE)

fi_glm <- feature_importance(explain_titanic_glm)

fi_glm
#>       variable mean_dropout_loss label
#> 1 _full_model_         0.2640697    lm
#> 2        class         0.2640697    lm
#> 3     embarked         0.2640697    lm
#> 4        sibsp         0.2640697    lm
#> 5        parch         0.2640697    lm
#> 6          age         0.2774528    lm
#> 7         fare         0.2843086    lm
#> 8       gender         0.3943831    lm
#> 9   _baseline_         0.5057019    lm