
Plot feature importance across multiple models
Source:R/visualization.R
tl_plot_importance_comparison.RdEach model's importance is rescaled on its own: its largest value
becomes 100, or, when no value is positive (a forest's permutation
importance can be negative throughout), its largest magnitude becomes
-100. A factor predictor
appears once, under its own name, for every model: the largest of its
design columns stands for it where a method ranks those columns
separately (ridge, lasso, elastic net and xgboost). A predictor a model
was given but did not use scores zero for that model; one it was never
given has no bar for it. Tree, forest and boost models are given the
variables of an interaction such as wt:hp rather than the
interaction itself, so it has no bar for them. Features are ranked on
their mean importance over the models that were given them.
Value
A ggplot object.
