multiHyperRisk: Multi-Hyperparameter Risk Plots

View source: R/plot_functions.R

multiHyperRiskR Documentation

Multi-Hyperparameter Risk Plots

Description

multiHyperRisk() produces plots of the cross-validated risk for estimators with more than one hyperparameter. The function transforms one of the hyperparameters into a factor and uses it to distinguish between the risk of various estimators. If one of the hyperparameters has only one unique value, that hyperparameter is used as the factor variable. If all hyperparameters have only one unique value, a plot is not generated for that estimator class.

Usage

multiHyperRisk(dat, estimator, switch_vars = FALSE, min_max = FALSE)

Arguments

dat

A data.frame of cross-validated risks. Specifically, this is the risk_df table output by cvCovEst().

estimator

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

switch_vars

A logical indicating if the x-axis and factor variables should be switched. Default is FALSE.

min_max

A logical. If TRUE, only the minimum and maximum values of the factor hyperparameter will be used. Defaults to FALSE.

Value

A named list of plots.


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