Description Usage Arguments Value See Also Examples
Improved ARIMA model selection using smart training algorithms and heuristic search options.
1 2 3 4 | auto.karma(y, method = "best-first", xreg = NULL, metric = "AICc",
cv = "out", max_iter = 5, test_pct = "auto", test_type = "auto",
max_sdiff = F, violate_aic = T, karma_transform = F, plot = F,
stdout = F)
|
y |
A univariate time-series vector; type <numeric> or <ts> |
method |
Model selection algorithm; "markov-selection": Trains MS-ARIMA model; "local-descent": Trains LD-ARIMA model; "random-walk": Trains RW-ARIMA model |
xreg |
Optional vector or matrix of exogenous regressors; see documentation for Arima(), package 'forecast' |
metric |
Choose a model validation metric that will be used as the main optimisation criterion during model selection |
cv |
Choose cross-validation dataset to be used during model selection; "out": Performance of out-of-sample forecast (classic train/test split) will be used for model validation; "in": Performance of in-sample forecast (classic parametric regression type of validation) will be used for model validation |
max_iter |
For karma.boxjenkins(): Maximum number of iterations without improvement before the algorithm converges naturally (reached a global or local optimum) |
test_pct |
Percentage of train-test split in cross-validation (e.g. 70-30), positive integer for "window" or "percentage" test_type; "auto" to read from karma.fit object or generate; negative integer value to set window size to a multiple of the series' frequency |
test_type |
Train-test split type, i.e. percentage or fixed window; "auto": will try to read from karma.fit object or generate; "percentage": test_pct = 12 will be read as the 12 percent of the length of the series; "window": test_pct = 12 will be read as the 12 last time points (e.g. months) of the series; "auto" if input series is a ts() object, test_type is set to "window" and test_pct is set to twice the frequency of the series - if test_pct is given a negative factor, then test_pct (window size) will be set to the frequency of the series times the absolute value of that negative number |
max_sdiff |
Option to set a threshold to the order of seasonal differencing. (T/F) |
violate_aic |
Heuristic option to escape local optima by preferring a model of lower AICc even if it's not comparable in theory; (T/F) |
karma_transform |
Option to automatically detect and apply the right transformation for wide-sense stationarity (T/F) |
plot |
Option to depict plots during local search; if TRUE (default), AC and PAC plots are active <logical> |
stdout |
Option to output optimisation diagnostics during local search; <logical> |
Object of class "karma.fit"; (extends class "Arima" from package 'forecast')
1 2 3 4 5 6 7 8 9 10 | # One-line MS-ARIMA fit:
sfit = auto.karma(mdeaths)
# Validate trained model on test set:
karma.cv(sfit)
# One-line LD-ARIMA fit with in-sample validation and verbose search output:
sfit = auto.karma(y = mdeaths, method = "local-descent", cv = "in", stdout = T )
karma.cv(sfit)
# One-line RW-ARIMA using nonparametric training:
sfit = auto.karma(y = mdeaths, method = "random-walk", stdout = T )
karma.cv(sfit)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.