importance | R Documentation |
Xy()
simulationGet the feature importance of an Xy()
simulation
importance(object, plot = TRUE)
object |
an object of class |
plot |
a boolean signaling whether to print an importance plot |
The importance is calculated as the relative local contribution of the effect, for instance the absolute share of a linear simulated effect (x_1) to the overall magnitude of y. The relative shares are then aggregated over the whole simulated data set
Returns the effect importance of a cooked simulation recipe. The plot
argument can be used to create a feature importance plot.
# create a simulation
linear_sim <- Xy() %>%
add_linear(p = 5) %>%
Xy::simulate(n = 100)
# fetch the variable importance of the simualtion
linear_sim %>% importance()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.