easy_fit: This function performs the training of the chosen models to a...

Description Usage Arguments Details Author(s) Examples

Description

This function performs the training of the chosen models to a group of outcomes (y)

Usage

1
2
3
4
5
6
7
easy_fit(dy, dx, nfolds = 10, repeats = NA, resample_ = "cv",
  metric = ifelse(is.factor(dy[, 1]), "Kappa", "Rsquared"), cpu_cores = 7,
  tune_length = 5, fun_RFE = caret::rfFuncs, repeats_RFE = 1,
  metric_RFE = ifelse(is.factor(dy[, 1]), "Kappa", "Rsquared"),
  nfolds_RFE = 5, sizes_RFE = c(2:10, 15), tolerance_RFE = 0,
  models = c("ridge", "rf", "cubist", "pls", "foba", "gbm", "glmboost"),
  preprocess = NULL, seeds = NULL, verbose = TRUE)

Arguments

dy

outcomes

dx

co-variables

nfolds

Number of folds to be build in crossvalidation

repeats

repeats

resample_

resample method 'boot', 'boot632', 'optimism_boot', 'boot_all', 'cv', 'repeatedcv', 'LOOCV', 'LGOCV','none', 'oob', 'timeslice', 'adaptive_cv', 'adaptive_boot', 'adaptive_LGOCV'

metric

metric used to evaluate model fit. For numeric outcome ("RMSE", "Rsquared)

cpu_cores

Number of CPU cores to be used in parallel processing

tune_length

By default, this argument is the number of levels for each tuning parameters that should be generated by train.

fun_RFE

A list of functions for model fitting, prediction and variable importance

repeats_RFE

repeats to recursive feature elimination

metric_RFE

metric to recursive feature elimination

nfolds_RFE

nfolds to recursive feature elimination

sizes_RFE

A numeric vector of integers corresponding to the number of features that should be retained

tolerance_RFE

tolerance

models

vector of models to be fitted. Uses algortims names from Caret package.

preprocess

pre process

seeds

seeds

verbose

show results and messages from processing functions

Details

details

Author(s)

Elpidio Filho, elpidio@ufv.br

Examples

1
2
3
4
## Not run: 
easy_fit(dy,dx,train,models = c("ridge", "rf", "cubist"), metric = "Rsquared", tolerance = 2)

## End(Not run)

elpidiofilho/easyFit documentation built on May 28, 2019, 8:36 p.m.