control_modeltime: Control aspects of the training process

control_modeltimeR Documentation

Control aspects of the training process

Description

These functions are matched to the associated training functions:

  • control_refit(): Used with modeltime_refit()

  • control_fit_workflowset(): Used with modeltime_fit_workflowset()

  • control_nested_fit(): Used with modeltime_nested_fit()

  • control_nested_refit(): Used with modeltime_nested_refit()

  • control_nested_forecast(): Used with modeltime_nested_forecast()

Usage

control_refit(verbose = FALSE, allow_par = FALSE, cores = -1, packages = NULL)

control_fit_workflowset(
  verbose = FALSE,
  allow_par = FALSE,
  cores = -1,
  packages = NULL
)

control_nested_fit(
  verbose = FALSE,
  allow_par = FALSE,
  cores = -1,
  packages = NULL
)

control_nested_refit(
  verbose = FALSE,
  allow_par = FALSE,
  cores = -1,
  packages = NULL
)

control_nested_forecast(
  verbose = FALSE,
  allow_par = FALSE,
  cores = -1,
  packages = NULL
)

Arguments

verbose

Logical to control printing.

allow_par

Logical to allow parallel computation. Default: FALSE (single threaded).

cores

Number of cores for computation. If -1, uses all available physical cores. Default: -1.

packages

An optional character string of additional R package names that should be loaded during parallel processing.

  • Packages in your namespace are loaded by default

  • Key Packages are loaded by default: tidymodels, parsnip, modeltime, dplyr, stats, lubridate and timetk.

Value

A List with the control settings.

See Also

  • Setting Up Parallel Processing: parallel_start(), [parallel_stop())]

  • Training Functions: [modeltime_refit()], [modeltime_fit_workflowset()], [modeltime_nested_fit()], [modeltime_nested_refit()]

[parallel_stop())]: R:parallel_stop()) [modeltime_refit()]: R:modeltime_refit() [modeltime_fit_workflowset()]: R:modeltime_fit_workflowset() [modeltime_nested_fit()]: R:modeltime_nested_fit() [modeltime_nested_refit()]: R:modeltime_nested_refit()

Examples


# No parallel processing by default
control_refit()

# Allow parallel processing
control_refit(allow_par = TRUE)

# Set verbosity to show additional training information
control_refit(verbose = TRUE)

# Add additional packages used during modeling in parallel processing
# - This is useful if your namespace does not load all needed packages
#   to run models.
# - An example is if I use `temporal_hierarchy()`, which depends on the `thief` package
control_refit(allow_par = TRUE, packages = "thief")


modeltime documentation built on Nov. 16, 2022, 5:09 p.m.