Type: | Package |
Title: | Dynamic Mode Decomposition for Multivariate Time Feature Prediction |
Version: | 1.1.0 |
Description: | An application of Dynamic Mode Decomposition for prediction of time features. Automatic search for the best model across the space of all possible feature combinations and ranks of Singular Value Decomposition. |
License: | GPL-3 |
Encoding: | UTF-8 |
LazyData: | true |
RoxygenNote: | 7.1.1 |
Depends: | R (≥ 4.1) |
Imports: | purrr (≥ 0.3.4), ggplot2 (≥ 3.3.5), readr (≥ 2.1.2), lubridate (≥ 1.7.10), imputeTS (≥ 3.2), fANCOVA (≥ 0.6-1), scales (≥ 1.1.1), tictoc (≥ 1.0.1), modeest (≥ 2.4.0), moments (≥ 0.14), greybox (≥ 1.0.1), MASS (≥ 7.3-54), matlib (≥ 0.9.5), narray (≥ 0.4.1.1) |
URL: | https://rpubs.com/giancarlo_vercellino/dymo |
NeedsCompilation: | no |
Packaged: | 2022-05-04 12:50:15 UTC; gvercellino |
Author: | Giancarlo Vercellino [aut, cre, cph] |
Maintainer: | Giancarlo Vercellino <giancarlo.vercellino@gmail.com> |
Repository: | CRAN |
Date/Publication: | 2022-05-05 08:00:02 UTC |
dymo
Description
Dynamic Mode Decomposition for Multivariate Time Feature Prediction
Usage
dymo(
df,
seq_len,
n_windows = 10,
ci = 0.8,
smoother = FALSE,
min_feats = NULL,
max_feats = NULL,
dates = NULL,
error_scale = "naive",
error_benchmark = "naive",
seed = 42
)
Arguments
df |
A data frame with time features on columns. You need at least two time features. In case of missing values, automatic missing imputation through kalman filter will be performed. |
seq_len |
Positive integer. Time-step number of the forecasting sequence. Default: NULL (automatic selection between 1 and the square root of full length). |
n_windows |
Positive integer. Number of validation windows to test prediction error. Default: 10. |
ci |
Confidence interval for prediction. Default: 0.8 |
smoother |
Logical. Flag to TRUE for loess smoothing. Default: FALSE. |
min_feats |
Positive integer. Minimum number of time features to combine. Default: NULL (set equal to the total number of features) |
max_feats |
Positive integer. Maximum number of time features to combine. Default: NULL (set equal to the total number of features) |
dates |
Date. Vector with dates for time features. |
error_scale |
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". |
error_benchmark |
String. Benchmark for the relative error metrics. Two options: "naive" (sequential extension of last value) or "average" (mean value of true sequence). Default: "naive". |
seed |
Positive integer. Random seed. Default: 42. |
Value
This function returns a list including:
comb_metrics: error metrics for all possible combinations of time features (for each combination, pred_score, me, mae, mse, rmsse, mpe, mape, rmae, rrmse, rame, mase, smse, sce, gmrae, are averaged across features, ranks and validation windows)
best_model: best combination resulting from the average prediction score across different ranks and features, including:
best_combination: combination of indexes and rank for the best model
testing_errors: testing errors for each time feature averaged across validation windows
quant_preds: min, max, q25, q50, q75, quantiles at selected ci, mean, sd, mode, skewness, kurtosis, IQR to range, median range ratio, upside probability and divergence for each point fo predicted sequences
plots: standard plot with confidence interval for each time feature
time_log
Author(s)
Maintainer: Giancarlo Vercellino giancarlo.vercellino@gmail.com [copyright holder]
Giancarlo Vercellino giancarlo.vercellino@gmail.com
See Also
Useful links:
Examples
dymo(time_features[,c(2, 3, 4)], seq_len = 10, dates = time_features$dates)
time features example: IBM, AAPL, AMZN, GOOGL and MSFT Close Prices
Description
A data frame with with daily with daily prices for some Big Tech Companies since March 2017.
Usage
time_features
Format
A data frame with 6 columns and 1336 rows.
Source
finance.yahoo.com