run_models: Run Models

Description Usage Arguments Details Author(s) Examples

Description

This function run many models using the same data

Usage

1
2
3
4
run_models(df, models = "rf", formula = NULL, preprocess = NULL,
  index = NULL, rsample = "cv", nfolds = 10, repeats = NA,
  tune_length = 5, search = "grid", cpu_cores = 0, metric = NULL,
  seeds = NULL, verbose = TRUE)

Arguments

df

Training dataframe

models

chosen models to be used to train model. Uses algortims names from Caret package.

formula

A formula of the form y ~ x1 + x2 + ... If users don't inform formula, the first column will be used as Y values and the others columns with x1,x2....xn

preprocess

pre process

index

Users cross validation folds. Default = NULL

rsample

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

nfolds

Number of folds to be build in crossvalidation

repeats

number of repeats to resample method repeatedcv

tune_length

This argument is the number of levels for each tuning parameters that should be generated by train

search

search option "grid" or "random"

cpu_cores

Number of CPU cores to be used in parallel processing

metric

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

seeds

generate random seeds to allow reproductible results

verbose

prints results during the execution of the function

Details

details

Author(s)

Elpidio Filho, elpidio@ufv.br

Examples

1
2
3
4
5
## Not run: 
models = c('ridge', 'rf', 'cubist','pls','pcr','foba','gbm','glmboost')
fit_models = run_models(df,models = models)

## End(Not run)

elpidiofilho/labgeo documentation built on May 14, 2019, 9:35 a.m.