You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
prediction_log =forecast(model, steps_ahead) # arguments are the output of the fitted model and number of steps ahead the user wants to forecast
76
+
StateSpaceLearning.fit!(model)
77
+
prediction_log =StateSpaceLearning.forecast(model, steps_ahead) # arguments are the output of the fitted model and number of steps ahead the user wants to forecast
The paper has two experiments (results for the M4 competition and a simulation study). To reproduce each experiment follow the instructions below:
237
+
To reproduce the paper results, run the following experiments:
238
+
239
+
### M4 Competition Test
238
240
239
-
### M4 Experiment
241
+
Evaluates SSL and SS (StateSpaceModels) benchmark models on M4 competition dataset across all granularities (Monthly, Quarterly, Daily, Hourly, Weekly, Yearly).
240
242
241
-
To reproduce M4 paper results you can clone the repository and run the following commands on terminal:
243
+
**Before running:** Add PyCall to your Julia environment:
244
+
```julia
245
+
using Pkg
246
+
Pkg.add("PyCall")
247
+
```
248
+
249
+
The script also requires Python packages (`statsmodels`, `numpy`) for the SS benchmark evaluation.
242
250
243
251
```shell
244
252
julia paper_tests/m4_test/m4_test.jl
245
-
python paper_tests/m4_test/m4_test.py
246
253
```
247
254
248
-
The results for SSL model in terms of MASE and sMAPE for all 48000 series will be stored in folder "paper_tests/m4_test/results_SSL". The average results of MASE, sMAPE and OWA will be saved in file "paper_tests/m4_test/metric_results/SSL_METRICS_RESULTS.csv".
255
+
The script:
256
+
- Downloads M4 competition datasets directly from GitHub
257
+
- Runs SSL models with various configurations (with/without outliers, different selection methods, and alpha values)
258
+
- Runs SS (StateSpaceModels) benchmark models using PyCall
259
+
- Calculates metrics (MASE, sMAPE, OWA, CRPS) for all models
249
260
250
-
The results for SS model in terms of MASE and sMAPE for all 48000 series will be stored in folder "paper_tests/m4_test/results_SS". The average results of MASE, sMAPE and OWA will be saved in file "paper_tests/m4_test/metric_results/SS_METRICS_RESULTS.csv".
261
+
Results are saved in:
262
+
-`paper_tests/m4_test/results_SSL/` - SSL model results by granularity
263
+
-`paper_tests/m4_test/metrics_results/` - Summary metrics and benchmark results
251
264
252
-
### Simulation Experiment
265
+
### Simulation Parameter Study
253
266
254
-
To reproduce the simulation results you can clone the repository and run the following commands on terminal:
267
+
Compares SSL vs Kalman filter on simulated data.
255
268
256
269
```shell
257
-
julia paper_tests/simulation_test/simulation.jl 0
270
+
julia paper_tests/simulation_param/simulation.jl [repetitions] [sample_sizes]
258
271
```
259
272
260
-
As this test takes a long time, you may want to run it in parallel, for that you can change the last argument to be number of workers to use in the parallelization:
273
+
Example:
274
+
```shell
275
+
julia paper_tests/simulation_param/simulation.jl 100 60,120,240
276
+
```
277
+
278
+
Results are saved in `paper_tests/simulation_param/ssl_vs_kalman_paired_tests.csv`.
279
+
280
+
### Simulation Test
281
+
282
+
Large-scale simulation comparing SSL, SS, and other methods.
283
+
284
+
```shell
285
+
julia paper_tests/simulation_test/simulation.jl [num_workers]
286
+
```
261
287
288
+
Example (with 4 parallel workers):
262
289
```shell
263
-
julia paper_tests/simulation_test/simulation.jl 3
290
+
julia paper_tests/simulation_test/simulation.jl 4
264
291
```
265
292
266
-
The results will be saved in two separated files: "paper_tests/simulation_test/results_metrics/metrics_confusion_matrix.csv" and "paper_tests/simulation_test/results_metrics/metrics_bias_mse.csv"
293
+
Results are saved in `paper_tests/simulation_test/results_simulation/` and `paper_tests/simulation_test/results_metrics/`.
0 commit comments