Experiment 1
Overtraining vs Generalization
We asked a simple question: what really happens if you keep training a time‑series model well past the point where validation loss stops improving? Our hypothesis was that, with enough capacity and time, the model would effectively memorize the training set: training loss would keep falling, while validation loss would bottom out and then rise (the classic U‑shape), a widening generalization gap.
Experiment setup
- Dataset: Meteostat weather for a single location over ~5 years; chronological split 70%/15%/15% (train/val/test). Standardization uses train-set statistics.
- Model: LSTM regression (PyTorch); sequence length 72 (hourly) or 30 (daily variant); hidden size 64; 1–2 layers; dropout 0.1.
- Training: Adam optimizer; learning rate 1e-3 (baseline) and 1e-4 (stability check); batch size 64; seed 42.
- Runs: Baseline, up to 100 epochs with early stopping (patience 10 on validation loss). Overtrain, 400 epochs without early stopping.
Data acquisition
- Source: Meteostat Daily via Python.
- Location: Pune, India (lat 18.xxxx, lon 73.xxxx).
- Period: 2019-01-01 to 2023-12-31.
- Station selection: scanned nearby stations by coverage and used station 43064 (≈100% coverage across selected variables).
- Variables kept: date (renamed from time), tavg, tmin, tmax, prcp, wspd, pres.
- Cleaning: dropped rows where all selected variables were missing; then saved to CSV. Univariate target uses tavg.
- Saved paths: canonical dataset at Dataset/pune_daily_2019_2023.csv; experiment copy at Experiments/EXP1/pune_daily_2019_2023_exp_1.csv.
Results at a glance
- Early stopping kept validation loss near its minimum and limited the gap between train and validation.
- Overtraining drove training loss down further, but validation loss turned upward, clearly indicating overfitting.
- The generalization gap widened substantially in the overtrained run, implying worse performance on truly unseen data.
Curves
Baseline run: Training and validation curves track closely for most of training. Validation stabilizes and does not deteriorate, showing healthy generalization.
exp1 lr 0 001 adam baseline
RechartsChart.js
- Training Loss
- Validation Loss
Overtrained run (400 epochs): Training loss continues to decrease steadily. Validation loss bottoms out and then rises, forming a U‑shaped curve and creating a clear generalization gap.
exp1 lr 0 001 adam overtrain
RechartsChart.js
- Training Loss
- Validation Loss
What this means
- The model learned idiosyncrasies of the training data beyond the point of best validation performance.
- Lower training loss does not guarantee better generalization; after a point, it often indicates the opposite.
- Early stopping (and/or stronger regularization) is an effective guardrail against overfitting for this setup.
Conclusion
Hypothesis confirmed. Overtraining reduced training loss but hurt validation performance, widening the generalization gap. For this task, stopping around the validation minimum is the right trade‑off.