optimize.model: Model Optimization and Metrics

Description Usage Arguments Value Author(s)

View source: R/optimize.R

Description

Optimizes each model based upon the parameters provided either by the internal denovo.grid function or by the user.

Usage

1
2
3
optimize.model(trainVars, trainGroup, method, k.folds = 10, repeats = 3,
  res = 3, grid = NULL, metric = "Accuracy", allowParallel = FALSE,
  verbose = "none", theDots = NULL)

Arguments

trainVars

Data used to fit the model

trainGroup

Group identifiers for the training data

method

A vector of strings listing models to be optimized

k.folds

Number of folds generated during cross-validation. Default "k.folds = 10"

repeats

Number of times cross-validation repeated. Default "repeats = 3"

res

Resolution of model optimization grid. Default "res = 3"

grid

Optional list of grids containing parameters to optimize for each algorithm. Default "grid = NULL" lets function create grid determined by "res"

metric

Criteria for model optimization. Available options are "Accuracy" (Predication Accuracy), "Kappa" (Kappa Statistic), and "AUC-ROC" (Area Under the Curve - Receiver Operator Curve)

allowParallel

Logical argument dictating if parallel processing is allowed via foreach package

verbose

Character argument specifying how much output progress to print. Options are 'none', 'minimal' or 'full'.

theDots

List of additional arguments provided in the initial classification and features selection function

Value

Basically a list with the following elements:

method

Vector of strings listing models that were optimized

performance

Performance generated internally to optimize model

bestTune

List of paramaters chosen for each model

dots

List of extra arguments initially provided

metric

Criteria that was used for model optimization

finalModels

The fitted models with the 'optimum' parameters

performance.metrics

The performance metrics calculated internally for each resulting prediction

tune.metrics

The results from each tune

perfNames

The names of the performance metrics

comp.catch

If the optimal PLSDA model contains only 1 component, the model must be refit with 2 components. This catches the 1 component parameter so feature selection and further performance analysis can be conducted on the 1 component.

Author(s)

Charles E. Determan Jr.


OmicsMarkeR documentation built on April 28, 2020, 6:54 p.m.