Could somebody show me how to generate permutation-based variable implots within the tidy modelling framework? Currently, I have this:
library(tidymodels)
# variable importance
final_fit_train %>%
pull_workflow_fit() %>%
vip(geom = "point",
aesthetics = list(color = cbPalette[4],
fill = cbPalette[4])) +
THEME +
ggtitle("Elastic Net")
which generates this:
However, I would like to have something like this
It's not clear to me how the rather new tidy modelling framework integrates with the current VIP package. Anybody that could help. Thanks!
https://koalaverse.github.io/vip/articles/vip.html (API of the VIP package).


To compute variable importance using permutation, you need just a few more pieces to put together, compared to using model-dependent variable importance.
Let's look at an example for an SVM model, which does not have model-dependent variable importance score.
Our model is now trained, so it's ready for computing variable importance. Notice a couple of steps:
pull()the fitted model object out of the workflow.compounds.predict()).Created on 2020-07-17 by the reprex package (v0.3.0)
You can increase
nsimhere to do this more than once.