Empirical Extrapolation of Time Feature Pattern
naive(
df,
seq_len = NULL,
ci = 0.8,
smoother = FALSE,
cover = NULL,
stride = NULL,
method = NULL,
location = NULL,
n_windows = 10,
n_samp = 30,
dates = NULL,
error_scale = "naive",
error_benchmark = "naive",
seed = 42
)This function returns a list including:
exploration: collection of all the models explored with random search
history: a table with the explored models' hyper-parameters and validation errors
best_model: best combination resulting from the average prediction score across different ranks and features, including:
quant_preds: min, max, q25, q50, q75, quantiles at selected ci, mean, sd, mode, skewness, kurtosis, IQR to range, above to below median range, upside probability and divergence for each point fo predicted sequences
errors: testing errors for each time feature averaged across validation windows
plots: standard plot with confidence interval for each time feature
time_log
A data frame with time features on columns (all numerics or all categories, but not both). In case of missing values, automatic missing imputation through kalman filter will be performed.
Positive integer. Time-step number of the forecasting sequence. Default: NULL (random selection within boundaries).
Confidence interval for prediction. Default: 0.8
Logical. Flag to TRUE for loess smoothing (only for numeric series). Default: FALSE.
Positive numeric. The quantile cover around the location parameter (between 0 and 1). Default: NULL (random selection within boundaries).
Positive integer. Shift between subsequent sequences. Default: NULL (random selection within boundaries).
String. Distance method using during the comparison of time sequences. Possible options are: "euclidean", "manhattan", "minkowski". Default: NULL (random selection).
String. Statistic used to center the cover parameter. Possible options are: "mean", "mode" (parzen method), "median". Default: NULL (random selection).
Positive integer. Number of validation windows to test prediction error. Default: 10.
Positive integer. Number of sample selected during random search. Default: 30.
Date. Vector with dates for time features.
String. Scale for the scaled error metrics. Two options: "naive" (average of naive one-step absolute error for the historical series) or "deviation" (standard error of the historical series). Default: "naive".
String. Benchmark for the relative error metrics. Two options: "naive" (sequential extension of last value) or "average" (mean value of true sequence). Default: "naive".
Positive integer. Random seed. Default: 42.
Giancarlo Vercellino giancarlo.vercellino@gmail.com
Maintainer: Giancarlo Vercellino giancarlo.vercellino@gmail.com [copyright holder]
Useful links:
{
naive(time_features[, 2:3, drop = FALSE], seq_len = 30, n_samp = 1, n_windows = 5)
}
Run the code above in your browser using DataLab