Add ML prediction pipeline — LightGBM, calibration fix, ensemble disagreement

Tier 1 ML enhancements:
- Feature engineering (37 features across 5 groups: thermal, dynamic,
  moisture, temporal, interaction) from NWP model output
- 7 LightGBM probability models for rain/temp/wind thresholds
- Temperature-scaled probabilities to prevent overconfidence on bootstrap data
- MLPredictor: unified inference pipeline replacing heuristic sigmoids
- Ensemble disagreement signals (composite spread → edge amplification)
- Fixed calibration loop: update_calibration() now functional (EMA of errors)
- record_outcome() wired for post-resolution feedback
- Nautilus strategy updated: ML predictions take priority, heuristics as fallback
- Historical backtest engine with Sharpe/ROI/max-DD simulation
- Bootstrap training data generator from HK climate normals

Run: python ml/train.py && python ml/backtest.py --edge 50
This commit is contained in:
ramseshk
2026-08-10 17:50:07 +08:00
parent 533939d178
commit 7d7a67bd20
9 changed files with 1713 additions and 16 deletions
+3 -1
View File
@@ -4,6 +4,9 @@ __pycache__/
*.pyo
.env
data/weights/*.npz
data/models/*.lgb
data/models/*_meta.json
data/models/training_summary.json
.opencache/
.openmeteo_cache*
.openmeteo_cache.sqlite
@@ -12,4 +15,3 @@ logs/
*.log
.DS_Store
*.sqlite