rda_high_dim_cv: Helper function to optimize the HDRDA classifier via...

Description Usage Arguments Details Value

View source: R/rda-high-dim.r

Description

For a given data set, we apply cross-validation (cv) to select the optimal HDRDA tuning parameters.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
rda_high_dim_cv(
  x,
  y,
  num_folds = 10,
  num_lambda = 21,
  num_gamma = 8,
  shrinkage_type = c("ridge", "convex"),
  verbose = FALSE,
  ...
)

Arguments

x

Matrix or data frame containing the training data. The rows are the sample observations, and the columns are the features. Only complete data are retained.

y

vector of class labels for each training observation

num_folds

the number of cross-validation folds.

num_lambda

The number of values of lambda to consider

num_gamma

The number of values of gamma to consider

shrinkage_type

the type of covariance-matrix shrinkage to apply. By default, a ridge-like shrinkage is applied. If convex is given, then shrinkage similar to Friedman (1989) is applied. See Ramey et al. (2017) for details.

verbose

If set to TRUE, summary information will be outputted as the optimal model is being determined.

...

Options passed to rda_high_dim().

Details

The number of cross-validation folds is given in num_folds.

Value

list containing the HDRDA model that minimizes cross-validation as well as a data.frame that summarizes the cross-validation results.


sparsediscrim documentation built on July 1, 2021, 9:07 a.m.