cv_genet: Cross validate generalized elastic net tuning parameters

Description Usage Arguments Value

View source: R/cv_genet.R

Description

Cross validate generalized elastic net tuning parameters

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
cv_genet(
  formula,
  data,
  family = gaussian(),
  cv.method = c("adaptive_boot", "adaptive_cv"),
  nfolds = 15,
  nrep = 4,
  tunlen = 10,
  folds = NULL,
  max.lambda = 3,
  crit = c("MSE", "MAE", "Accuracy", "kappa")
)

Arguments

formula

a model formula

data

a training data set

family

a glm family

cv.method

preferably one of "adaptive_boot" or "adaptive_cv"

nfolds

the number of bootstrap or cross-validation folds to use. defaults to 15.

nrep

the number of repetitions for cv.method = "repeatedcv". defaults to 4.

tunlen

the number of values of lambda to test. defaults to 10.

folds

a vector of pre-set cross-validation or bootstrap folds from caret::createResample or caret::createFolds.

crit

the criterion by which to evaluate the model performance. must be one of "MAE" (the default) or "MSE".

max.c

the largest value of lambda to try.

Value

a train object


abnormally-distributed/cvreg documentation built on May 3, 2020, 3:45 p.m.