Next-day mean temperature
01 Production-minded ML / Python
Weather isn't
guessed.
It's measured.
26 years of daily observations. 18 engineered features. Six models judged
on the same future holdout. The best run writes itself to forecast.txt.
- Data window
- 2000 — 2026
- Train / holdout
- 80 / 20
- Best test MAE
- 1.77°C
clean days after feature engineering
models evaluated under one protocol
future days held out from training
best test mean absolute error
02 Observations / 2000—2026
One series.
Every signal.
Daily mean, min/max envelope and precipitation from the production CSV. Change the window and inspect any day.
Fields already produced by data.py
03 Evaluation / MAE
Six models.
One honest split.
Every candidate faces the same chronological holdout. Lowest MAE on the final 20% wins.
No future observation enters training. Time order stays intact.
04 Learned weights / best run
What moves
the forecast.
Learned coefficients from the latest run. Right is positive; left is negative. Zero remains visible.
05 Architecture / 7 stages
From CSV to
forecast.txt
Seven explicit stages: load, transform, train, compare, forecast and write the result.
data.pyLoad and engineer
pandas reads the CSV, shifts the series, then builds rolling 3/7-day and seasonal features.
9,663 → 9,656preprocessing.pyChronological split
The first 80% becomes train; the final 20% remains an untouched future holdout.
order preservedtraining.pyOne evaluation run
Six models train and score through the same orchestration layer.
6 candidatesgradient_model.pyGradients from scratch
Weights, bias, MSE and early stopping are implemented as plain Python functions.
no ML frameworkevaluation.pyOne shared metric
Every candidate resolves to MAE, keeping the comparison direct and consistent.
test_error ↓forecasting.pyPredict the next day
The winner receives the latest observations and the future date's seasonal phase.
2026-06-16reporting.pyWrite an auditable result
The chosen model, date, last observation and prediction are saved together.
forecast.txt06 Latest saved forecast
One number.
Full trace.
The forecast date follows the final CSV row. Update the dataset and the next day moves with it.
- Last observation
- 15 Jun 2026 / 16.7°C
- Forecast
- 16 Jun 2026 / 16.67°C
- Selected model
- Weather features gradient
01Next day forecast
02-----------------
03Model: Weather features gradient
04Last known date: 2026-06-15 00:00:00
05Forecast date: 2026-06-16
06Last temp avg: 16.7
07Predicted next temp avg: 16.67
07 Why the result is testable
Trust the test.
Not the headline.
This is a verifiable project snapshot, not a promise of permanent accuracy.
No future leakage
Lags and rolling means use past days only through shift(1).
Test follows train
No shuffling: evaluation reflects how the model performs later in time.
One common metric
MAE expresses all six approaches as the same average miss in degrees.
The result persists
Model, date, last observation and forecast remain in forecast.txt.
Average model miss, measured in degrees
Loss function used during gradient training
A continuous annual cycle with no December–January jump
08 Beta / next cycle
It works.
It isn't finished.
The current build is a verified static snapshot. Live runs and forecast history come next.
Working ML pipeline
Data → features → models → evaluation → forecast.
Project web dossier
Metrics, charts, weights and architecture in one interface.
Live API
Run the Python pipeline and request a fresh forecast from the site.
Forecast history
Compare each prediction with reality and track error over time.
History since 1884
A dedicated mode for all 52,031 rows of the extended dataset.
New signals
Pressure, precipitation, normalization and additional harmonics.