cvGrid: Grid Search via K-fold Cross Validation

Description Usage Arguments Value See Also

View source: R/4-1-grid-search.R

Description

Grid Search for hyper-parameters in a reg or wcls model via K-fold Cross Validation.

Usage

1
2
3
4
5
cvGrid(trainObj, k.fold = 10, gsCtrl, cutoff = 0.5, criteria = c("acc",
  "sens", "spec", "auc", "ppv", "npv", "mse", "w.acc", "a.acc", "val.f",
  NA)[ifelse("RegObj" %in% class(trainObj), 7, 4)], weight = rep(1,
  length(trainObj@X)[1]), inclusion = rep(TRUE, length(trainObj@X)[1]),
  print.fold = FALSE, progress = TRUE, all.models = FALSE)

Arguments

trainObj

A RegObj or wClsObj containing the training set.

k.fold

The number of folds in the cross validation.

gsCtrl

A list of arguments that specifies a regression or classification method, handled by gsCtrlPanel.

cutoff

A numeric value used as a cutoff to calculate accuracy when the outcome is bianry.

criteria

A criteria to decide for the best tuning parameters. If NA, then the best model will not be picked.

weight

A numeric vector indicating the weight of all samples. Used for the 'w.acc' criteria.

inclusion

A logical vector indicating whether a sample shoule be included in the performance evaluation.

print.fold

A logical value indicating whether each fold should be reported while model fitting.

progress

A logical value indicating whether a progress bar would be used to show the progress.

all.models

A logical value indicating whether to save all fitted models.

Value

A cvGrid-class object.

See Also

reg
wcls
ensemble
cvKfold
workflow


SkadiEye/ITRlearn documentation built on May 24, 2019, 1:31 a.m.