cvRiskPlot: Cross-Validated Risk Plot

View source: R/plot_functions.R

cvRiskPlotR Documentation

Cross-Validated Risk Plot

Description

cvRiskPlot() plots the cross-validated risk for a given estimator, or set of estimators, as a function of the hyperparameters.

Usage

cvRiskPlot(
  dat,
  est,
  plot_type = "risk",
  cv_details,
  switch_vars = FALSE,
  min_max = FALSE
)

Arguments

dat

A named list. Specifically, this is the standard output of cvCovEst().

est

A character vector specifying one or more classes of estimators to compare.

plot_type

A character detailing the type of plot. Passed to theme_cvCovEst(), defaults to "risk"

cv_details

A character vector summarizing key arguments passed to cvCovEst().

switch_vars

A logical. If TRUE, the hyperparameters used for the x-axis and factor variables are switched. Only applies to estimators with more than one hyperparameter. Defaults to FALSE.

min_max

A logical. If TRUE, only the minimum and maximum values of the factor hyperparameter will be used. Only applies to estimators with more than one hyperparameter. Defaults to FALSE.

Value

A single plot or grid of plots for each estimator specified.


cvCovEst documentation built on May 29, 2024, 5:51 a.m.