Train: Train, Validate and Test various models: Functions to train,...

Description Usage Arguments Value Author(s)

Description

Train, Validate and Test various models: Functions to train, select best hyper-paramters, select best classification thresholds and evaluate final model on the test set using a number of machine learning classification algorithms

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
TrainModels(...)

Train.Test(...)

Train.Boot(classifier, nboots = 2, XY.dat, resp.vars, rhs.vars,
  part.vars, reg.vars, para, parallel = TRUE, n.cores = 2,
  seed = 12345678)

cv.gbm(X, y, outcome = NULL, n.trees = seq(150, 500, by = 10),
  interaction.depth, n.minobsinnode = 5, shrinkage = 10^(seq(-3, -1,
  length = 10)), bag.fraction = 0.5, distribution = "bernoulli",
  foldid = NULL, nfolds = 10, seed = 220, verbose = FALSE)

Arguments

...

further arguments passed to or from other methods.

classifier

character list of classification models. See names(TrainAllModels()).

para

named list of model parameters

X.trn, X.val, X.tst

matrix of predictors

Y.trn, Y.val, Y.tst

matrix of binary {0,1} response variable

varimp

(logical) compute variable importance ?

opt.para

(logical) tune parameters ?

return.model

(logical) return trained model ?

Value

TrainModels returns a list of functions for training various algorithms. Currently 7 machine learning algorithms ELR, GLM, GLMnet, RF, GBM, avNNET, and SVM. Others can be easily added. Train.Validate.Test returns a list of performance measures for each classifier traoned:

model

trained model

para

named list of model hyper-paramters (tunned values if opt.para = TRUE)

run.time

compute time

varimp

variable importance if classifier is GLM, GBM or RF

perf

a list with two data.frames: val.perf and tst.perf containing performance measures for validation and test sets

Author(s)

Che Ngufor <Ngufor.Che@mayo.edu>


nguforche/Vira documentation built on June 2, 2019, 9:08 p.m.