plot_outerloop_coefs: plot_outerloop_coefs

View source: R/dCVnet_plotting.R

plot_outerloop_coefsR Documentation

plot_outerloop_coefs

Description

Plot showing standardised betas for outer-loop model coefficients. Because each fold/repetition of the outerloop can have completely different amounts and types of regularisation this should be interpreted with caution.

Usage

plot_outerloop_coefs(
  object,
  type = "rep",
  ordered = FALSE,
  abs = FALSE,
  intercept = FALSE,
  prod = TRUE,
  prod_col = "red",
  prod_shape = 24,
  panel_scaling = c("free", "fixed"),
  plot = TRUE
)

Arguments

object

a dCVnet object

type

Use "all" to inspect variability over cross-validation folds and reps. Use "production" for only the final model. See coef.dCVnet for full list of options.

ordered

sort predictors by size?

abs

plot absolute values?

intercept

include the value of the intercept coefficient in the plot?

prod

add the production model coefficients as an overlay? (note: this is not in the data returned by this function, but can be accessed with coef(object, type = "production"))

prod_col

colour for production model coefficients

prod_shape

shape for production model coefficients

panel_scaling

for multi-outcome coefficients (mgaussian, multinomial). Should y-axes be independent, or same over all panels.

plot

(bool) should the plot also be rendered (TRUE)?, or just returned as a R object (FALSE).

Details

Warning: do not use these plots to select a subset of variables and re-run dCVnet. These coefficients are based on the complete dataset and using the output of dCVnet to select variables will produce optimism in cross-validated estimates of performance.

Value

a list containing the plot and a data.frame used to plot (full data.frame is returned, i.e. ignores n.random)


AndrewLawrence/dCVnet documentation built on Sept. 24, 2024, 5:24 a.m.