ModelBuildNNforCaret.Rd
R6 class ModelBuildNNforCaret
R6 class ModelBuildNNforCaret
A dataframe containing the information about the different models
A dataframe containing the hyperparameters for the best model
new()
Initialize an object to compare several Univatiate Time Series Models
ModelBuildNNforCaret$new( data = NA, var_interest = NA, m = NA, search = "grid", grid = NA, tuneLength = NA, batch_size = NA, h = NA, parallel = TRUE, seed = 1, verbose = 0, ... )
data
The dataframe containing the time series realizations (data should not contain time index)
var_interest
The output variable of interest (dependent variable)
m
The frequency of the variable of interest
search
Caret grid search method: 'grid' or 'random' (Default = 'grid')
grid
If search = 'grid', what combinations of hyperparameters to use (See format in vignette). Allowed parameters in grid are "reps", "hd", and "allow.det.season"
tuneLength
If search = 'random', how many random combinations to try (Default = 3)
batch_size
Batch Size to use
h
Forecast Horizon
parallel
Should the grid search be run in parallel or not (Default = TRUE)
seed
The seed to use for training the the Neural Network (Default = 1)
verbose
How much to print during the model building and other processes (Default = 0)
...
Additional parameers to feed to nnfor::mlp function for building the model It is highly recommended to pass the frequency of the variable of interest 'm' to get a good model Other arguments that can be passed can be found by typing ?nnfor::mlp in the console
A new `ModelBuildNNforCaret` object.
get_data()
Returns the time series realization
ModelBuildNNforCaret$get_data()
The Time Series Realization
summarize_hyperparam_results()
Summarizes the results of all the hyperparameter combinations
ModelBuildNNforCaret$summarize_hyperparam_results()
summarize_best_hyperparams()
Summarizes the best hyperparameter combination
ModelBuildNNforCaret$summarize_best_hyperparams()
plot_hyperparam_results()
Plots the ASE metric variation along the hyperparameter space
ModelBuildNNforCaret$plot_hyperparam_results(level_plot = TRUE)
level_plot
A boolean indicating whether a level plot should be shown. useful for 'grid' search (Default = TRUE).
get_final_models()
Returns a final models
ModelBuildNNforCaret$get_final_models(subset = "a")
subset
The subset of models to get. 'a': All models (Default) 'r': Only the recommended models
If subset = 'a', returns the caret model object If subset = 'r', returns just the nnfor model
summarize_build()
Summarizes the entire build process
ModelBuildNNforCaret$summarize_build(level_plot = TRUE)
level_plot
A boolean indicating whether a level plot should be shown. useful for 'grid' search (Default = TRUE).
clone()
The objects of this class are cloneable with this method.
ModelBuildNNforCaret$clone(deep = FALSE)
deep
Whether to make a deep clone.