ml_tune: Function to tune ML algos for multiple time series...

Description Usage Arguments

View source: R/ml_tune.R

Description

ml_tune() will tune up to nine different ML algorithms used in forecasting

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
ml_tune(
  parsnip_recipe,
  modeltime_recipe,
  recipe_spec_catlight,
  vfold,
  grid_size,
  cv_repeats,
  parallel_type = "everything",
  return = c("modellist", "modeltable", "both"),
  splits,
  models = c("xgboost", "rf", "cubist", "svm_rbf", "svm_poly", "glmnet", "knn", "mars",
    "prophet_boost", "lightgbm", "catboost"),
  learn_rate = NULL,
  min_n = NULL,
  tree_depth = NULL,
  loss_reduction = NULL,
  save_modeltime_table = TRUE,
  include_simple_model_ensemble = FALSE,
  top_ensemble = NULL,
  GPU = FALSE
)

Arguments

parsnip_recipe

Recipe for parsnip models

modeltime_recipe

Recipe for modeltime models

recipe_spec_catlight

Recipes for catboost and lightgbm

vfold

Number of folds used in K-fold cross validation

grid_size

The size of the hyperparameter grid used for tuning the parameters

cv_repeats

How many CV repeats to use

return

What do you want to return. List of workflows, modeltime table or both?

splits

The split object to use

models

Choose which models to use. Choose any combination of xgboost, rf, cubist, svm_rbf, svm_poly, glmnet, knn, mars or prophet_boost

learn_rate

Upper and lower bound of learning rate to try out during tuning. NULL equals default values from the dials package

min_n

Upper and lower bound of min_n to try out during tuning. NULL equals default values from the dials package

tree_depth

Upper and lower bound of tree_depth to try out during tuning. NULL equals default values from the dials package

loss_reduction

Upper and lower bound of loss_reduction to try out during tuning. NULL equals default values from the dials package

save_modeltime_table

Should modeltime table be saved after tuning each algorithm. Defaults to TRUE

include_simple_model_ensemble

Should simple average of all the models be included? Defaults to TRUE

top_ensemble

Creates an ensemble only from the top models. Defaults to 3. Set = NULL if you don't want to use.

GPU

Should GPU be used where applicable? Defaults to FALSE

parallel_over

A single string containing either "resamples" or "everything" describing how to use parallel processing. See ?control_grid


vidarsumo/sumots documentation built on June 29, 2021, 4:23 a.m.