R6 class ModelCompareMultivariate

R6 class ModelCompareMultivariate

Methods

Public methods


Method new()

Initialize an object to compare several Univatiate Time Series Models

Usage

ModelCombine$new(
  data = NA,
  var_interest = NA,
  uni_models = NA,
  var_models = NA,
  mlp_models = NA,
  verbose = 0
)

Arguments

data

The dataframe containing the time series realizations (data should not contain time index)

var_interest

The output variable of interest (dependent variable)

uni_models

A vector of ModelCompareUnivariate objects

var_models

A vector of ModelCompareMultivariateVAR objects

mlp_models

A vector of ModelCompareNNforCaret objects (only picks the best caret model)

verbose

How much to print during the process (Default = 0)

Returns

A new `ModelCombine` object.


Method get_data()

Returns the time series realization

Usage

ModelCombine$get_data()

Returns

The Time Series Realization


Method get_var_interest()

Returns the dependent variable name

Usage

ModelCombine$get_var_interest()

Returns

The dependent variable name


Method get_data_var_interest()

Returns the dependent variable data only

Usage

ModelCombine$get_data_var_interest()

Returns

The dependent variable data only


Method set_verbose()

Adjust the verbosity level

Usage

ModelCombine$set_verbose(verbose = 0)

Arguments

verbose

0 = Minimal Printing only (usualy limited to step being performed) 1 = Basic printing of model builds, etc. 2 = Reserved for debugging mode. May slow down the run due to excessive printing, especially when using batches


Method plot_batch_forecasts()

Plots the forecasts per batch for all models

Usage

ModelCombine$plot_batch_forecasts(only_sliding = TRUE)

Arguments

only_sliding

If TRUE, this will only plot the batch forecasts for the models that used window ASE calculations


Method plot_batch_ases()

Plots the ASEs per batch for all models

Usage

ModelCombine$plot_batch_ases(only_sliding = TRUE)

Arguments

only_sliding

If TRUE, this will only plot the ASEs for the models that used window ASE calculations


Method plot_boxplot_ases()

Plots the boxplot of the ASE values for the models

Usage

ModelCombine$plot_boxplot_ases()


Method statistical_compare()

Statistically compares the ASE values of the models using ANOVA and Tukey Adjustment for multiple comparison

Usage

ModelCombine$statistical_compare()

Returns

The results of the ANOVA test


Method get_tabular_metrics()

Gets the metrics and results in tabular format

Usage

ModelCombine$get_tabular_metrics(only_sliding = FALSE, ases = TRUE)

Arguments

only_sliding

If TRUE, this will only get results for models that use a sliding ASE calculation method. (Default: FALSE)

ases

If TRUE returns the ASE values for each batch. If FALSE returns the forecasts, and the lower and upper limits asscoiated with the forecasts


Method create_ensemble()

Creates an ensemble model based on all the models provided

Usage

ModelCombine$create_ensemble()


Method clone()

The objects of this class are cloneable with this method.

Usage

ModelCombine$clone(deep = FALSE)

Arguments

deep

Whether to make a deep clone.