trainML: Train a Forecasting Model with Regression Models

Description Usage Arguments Details

View source: R/regression_model.R

Description

Train a forecasting model with regression models

Usage

1
2
3
4
trainML(input, y = NULL, x = NULL, seasonal = NULL,
  trend = list(linear = TRUE, exponential = FALSE, log = FALSE, power =
  FALSE), lags = NULL, events = NULL, method = "lm",
  method_arg = list(step = FALSE, direction = "both"), scale = NULL)

Arguments

input

A tsibble or ts object

y

A character, the column name of the depended variable of the input object, required (and applicable) only when the input is tsibble object

x

A character, the column names of the independed variable of the input object, applicable when using tsibble object with regressors

seasonal

A character, optional, create categorical variable/s to model the single or multiple seasonal components. Supporting the following frequencies structure c("quarter", "month", "week", "yday", "wday", "hour") for quarterly, monthly, weekly, day of the year, day of the week, and hourly respectively

trend

A list, define the trend structure. Possible arguments - "linear", a boolean variable, if set to TRUE defines a linear trend (e.g., index of 1,2,3,...,t, for a series with t observations) "power", an numeric value, defines the polynomial degree of the series index (for example a power = 0.5 define a square root index and power = 2 defines a squared index). By default set to NULL "exponential" - a boolean variable, if set to TRUE defines an exponential trend. "log" - a boolean variable, if set to TRUE defines a log transformation for the trend. By default, the trend argument is set to a linear trend (i.e., power = 1)

lags

A positive integer, defines the series lags to be used as input to the model (equivalent to AR process)

events

A list, an optional, create hot encoding variables based on date/time objects, where the date/time objects must align with the input object index class (may not work when the input object is 'ts'). For more information please see details

method

A character, defines the regression method to be used, currently only "lm" method is available

method_arg

A list, defines the argument of the selected method

scale

A character, scaling options of the series, methods available - c("log", "normal", "standard") for log transformation, normalization, or standardization of the series, respectively. If set to NULL (default), no transformation will occur

Details

XXXXXXXXXXX TBD XXXXXXXXXXXXXXXXXXX


RamiKrispin/forecastML documentation built on Nov. 15, 2019, 9:58 a.m.