Skip to content

Examples - #2

Merged
danielandresarcones merged 7 commits into
mainfrom
examples
Apr 8, 2026
Merged

danielandresarcones merged 7 commits into
mainfrom
examples

Conversation

@danielandresarcones

Copy link
Copy Markdown
Owner

Added and fixed examples notebooks to replicate the original paper.
Some bug fixes added to the python translation

Three notebooks in notebooks/:
- figure_simulated.ipynb: Figures 1 & 2 (simulated piecewise trend + 2 seasonalities + outliers)
- figure_airtraffic.ipynb: airline traffic comparison + decomposition figures
- figure_electricity.ipynb: Figures 3-5 (NY electricity demand, Ks=[7,365], obsSV='SV')

Each notebook:
- runs fit_BASTION with paper-quality MCMC settings
- saves output PDFs to outputs/
- loads R reference .rds files for comparison panels with graceful fallback
- uses the pybastion conda kernel
- Rename figure_* -> example_* (simulated, airtraffic, electricity)
- Add BASTION methodology introduction to each notebook
- Remove TBATS/MSTL/STR comparison code (not in pybastion)
- Add paper reference (arXiv:2601.18052) to each notebook
- Add Tables 2 & 3 metrics markdown cells as reference
- Simulated: 14 cells with true-vs-estimated component comparison
- Airtraffic: 11 cells with COVID-19 structural break annotation
- Electricity: 11 cells with SV LaTeX formulation and volatility plot
- Add QUICK_MODE toggle (True = fast demo, False = publication quality)
- Fix electricity column names: 'Data.Date' and 'Demand..MW.'
- Fix volatility key: summary['Volatility'] (was 'Volat_sum')
- Simulated: replace markdown metric tables with code cells that compute
  MSE (Table 2) and pointwise coverage (Table 3), adding 'this run' column
  alongside paper reference values
- Airtraffic/Electricity: add code cell computing in-sample fit statistics
  (R2, RMSE, component ranges, variance shares) displayed as a table
- All notebooks execute successfully in QUICK_MODE
@danielandresarcones
danielandresarcones merged commit f651e23 into main Apr 8, 2026
26 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant