candle-annotator/services/ml/app
Marko Djordjevic 40d6d1739e fix(ml): add windowed feature flattening for inference parity
The model was trained on 94-candle sliding windows flattened to 2820
features (94 candles x 30 features). Inference was sending raw per-candle
features (27 columns).

Changes:
- Rewrite preprocessing to return (X, window_times) tuple
- Add sliding window creation with correct feature ordering
- Fill missing columns (average, barCount) with 0 for feature parity
- Fill NaN from indicator warmup with 0 instead of dropping rows
- Always compute all indicators (including MFI) for feature parity
- Update predict and batch predict endpoints for new signature
2026-02-15 22:07:06 +01:00
..
__pycache__ fix(api): add GET /api/charts/[id] and fix batch prediction 2026-02-15 21:49:22 +01:00
__init__.py feat(ml): add database schema, config parser, and DVC setup 2026-02-15 12:08:53 +01:00
annotation_ingestion.py fix(ml): parse datetime column and fix TA-Lib pattern names 2026-02-15 21:13:20 +01:00
config.py feat(ml): add database schema, config parser, and DVC setup 2026-02-15 12:08:53 +01:00
db.py fix(ml): complete ML pipeline fixes and setup 2026-02-15 21:29:54 +01:00
main.py fix(ml): add windowed feature flattening for inference parity 2026-02-15 22:07:06 +01:00
preprocessing.py fix(ml): add windowed feature flattening for inference parity 2026-02-15 22:07:06 +01:00