plot_var_ranks: Plot variable importance rankings

View source: R/varImp.R

plot_var_ranksR Documentation

Plot variable importance rankings

Description

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

Usage

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.

Value

A ggplot2 plot.


nestedcv documentation built on April 4, 2025, 2:21 a.m.