Description Usage Arguments Examples
View source: R/aspect_importance.R
This function prints the results of aspect_importance.
1 2 |
x |
object of aspect_importance class |
show_features |
show list of features for every aspect |
show_corr |
show if all features in aspect are pairwise positively correlated (for numeric features only) |
... |
other parameters |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | library("DALEX")
model_titanic_glm <- glm(survived == 1 ~
class+gender+age+sibsp+parch+fare+embarked,
data = titanic_imputed,
family = "binomial")
explain_titanic_glm <- explain(model_titanic_glm,
data = titanic_imputed[,-8],
y = titanic_imputed$survived == 1,
verbose = FALSE)
aspects <- list(wealth = c("class", "fare"),
family = c("sibsp", "parch"),
personal = c("gender", "age"),
embarked = "embarked")
titanic_ai <- predict_aspects(explain_titanic_glm,
new_observation = titanic_imputed[1,],
variable_groups = aspects)
print(titanic_ai)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.