GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - devissaputra/lstm_time_series: Leakage-aware LSTM forecasting study comparing recurrent neural networks with persistence and linear autoregressive baselines.

BranchesTags
Open more actions menu

Latest commit

 

History

31 Commits
31 Commits

Folders and files

NameName
Last commit message
Last commit date
.github/workflows
.github/workflows
 
 
assets
assets
 
 
docs
docs
 
 
paper
paper
 
 
results
results
 
 
scripts
scripts
 
 
src
src
 
 
tests
tests
 
 
.gitignore
.gitignore
 
 
CALCULATIONS.md
CALCULATIONS.md
 
 
CITATION.cff
CITATION.cff
 
 
DATA.md
DATA.md
 
 
ETHICS.md
ETHICS.md
 
 
LICENSE
LICENSE
 
 
Makefile
Makefile
 
 
PORTFOLIO.md
PORTFOLIO.md
 
 
QUICK_DESCRIPTION.md
QUICK_DESCRIPTION.md
 
 
README.md
README.md
 
 
REPRODUCIBILITY.md
REPRODUCIBILITY.md
 
 
requirements.txt
requirements.txt
 
 

Repository files navigation

LSTM Forecasting for Mauna Loa CO₂

This experiment compares persistence, ridge autoregression, and a compact LSTM for next-week Mauna Loa CO₂ forecasting. Missing weeks now use past-only forward filling, and the corrected 20-epoch experiment has been rerun successfully in GitHub Actions. On the 452-week chronological holdout, ridge achieves RMSE 0.4639 ppm, persistence 0.5135 ppm, and the LSTM 1.0751 ppm. The recurrent model therefore does not justify its added complexity in this fixed-seed setup.

CI

Read the evidence

  • Calculation guide
  • Working paper
  • Data and reproduction instructions
  • Successful corrected run and run provenance

Study overview

Calculation and corrected evidence

Research question

Can a compact recurrent model improve next-week forecasts over persistence and a linear autoregression when the evaluation respects observation time?

Data and temporal boundaries

The source is the Mauna Loa CO₂ series bundled with statsmodels. Weekly observations are resampled and missing weeks are forward-filled using only a preceding observation. The earlier linear interpolation step could borrow a future measurement and has been removed. Older interpolation-based scores are superseded by the corrected run linked above.

Each input contains the previous 24 weekly values. The resulting 2,260 windows are split into 1,808 training and 452 test windows in time order. The mean and standard deviation are calculated only from observations available through the final training target.

MAE and RMSE are calculated after reversing training-fitted normalization and are reported in ppm. Later test predictions use earlier observed test values, so this is one-step rolling evaluation rather than a recursive forecast from one origin. One seed, fixed hyperparameters and one test era limit generalization.

Comparators

Persistence repeats the last observed concentration. Ridge regression uses the same 24-lag input with alpha 1.0. The LSTM has 32 hidden units and a linear output layer; it trains for 20 epochs with Adam, learning rate 0.005 and batch size 64. These settings are fixed, not selected on the test set.

Corrected results

Model RMSE (ppm) ↓ MAE (ppm) ↓
persistence 0.5135 0.4042
ridge 0.4639 0.3538
lstm 1.0751 0.8599

Ridge has the smallest error under both metrics. The result is useful precisely because the more complex model does not win. It does not imply that all recurrent models underperform on atmospheric time series.

Reproduce

python -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
python src/run_experiment.py
python scripts/build_review_figures.py
python scripts/build_review_figures.py --check

The runner saves unrounded metrics and forecast plots. Install pytest and run PYTHONPATH=. python -m pytest -q to run the existing tests. A regression test supplies a missing week between values 1 and 100 and verifies that the loader fills it with 1, not an interpolated future-dependent value.

Validation and limitations

The corrected full experiment and CI both succeeded in GitHub Actions. No repeated-seed confidence interval is claimed. This benchmark still needs additional forecast origins, independently chosen validation periods, seasonal/statistical baselines and sensitivity to missing-data policy before supporting a stronger comparative claim.

About

Leakage-aware LSTM forecasting study comparing recurrent neural networks with persistence and linear autoregressive baselines.

Topics

deep-learningforecastinglstmpytorchsequence-modelingtime-series-forecasting

Resources

Readme
MIT license
Activity

Stars

0 stars

Watchers

0 watching

Forks

0 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.