plot_var_ranks function

Plot variable importance rankings

Plot variable importance rankings

Plots variables selected in models ranked by variable importance across the outer folds as well as the final model.

plot_var_ranks( x, sort = TRUE, scheme = NULL, cex = 1, corral.width = 0.75, ... ) hist_var_ranks(x, sort = TRUE, scheme = NULL)

Arguments

  • x: A nestcv.glmnet or nestcv.train fitted object or a list of these, or a repeatcv object.
  • sort: Logical whether to sort variable by mean rank.
  • scheme: Optional vector of colours which is passed to ggplot2::scale_color_manual(). The vector is recycled, so a single value will colour all points in the same colour, while two values will lead to alternating row colours.
  • cex: Scaling for adjusting point spacing. See ggbeeswarm::geom_beeswarm().
  • corral.width: Numeric specifying width of corral, passed to geom_beeswarm
  • ...: Optional arguments passed to ggbeeswarm::geom_beeswarm() e.g. size.

Returns

A ggplot2 plot.

  • Maintainer: Myles Lewis
  • License: MIT + file LICENSE
  • Last published: 2025-03-10