jgrusewski
321d037f43
feat(dqn): Enable feature normalization from epoch 1 (remove two-phase training)
CRITICAL FIX: Two-phase training caused catastrophic forgetting (Sharpe -1.9541).
This commit normalizes features from epoch 1, matching Trial #26 approach (Sharpe 0.7743).
Changes:
- Pre-training normalization: Calculate stats and normalize ALL samples BEFORE epoch 1
- Remove two-phase transition: Delete stats collection phase and epoch-10 transition logic
- Simplify feature_vector_to_state: Remove runtime normalization (now pre-normalized)
- Add helper methods: calculate_feature_statistics() and normalize_dataset()
Validation:
- Q-values: ±1.88 (reasonable, not ±10,000)
- Pre-training logs: ✅ "Calculating feature statistics" before epoch 1
- NO two-phase transition logs during training
- Training completes successfully
Technical Details:
- ml/src/trainers/dqn.rs:2837-2850: Pre-training normalization added
- ml/src/trainers/dqn.rs:~1939-2013: Two-phase transition removed (deleted)
- ml/src/trainers/dqn.rs:3431-3432: feature_vector_to_state simplified
- ml/src/trainers/dqn.rs:4175-4214: Helper methods added
Expected Impact:
- Consistent state representation throughout training
- No catastrophic forgetting at normalization transition
- Expected Sharpe improvement: -1.95 → +0.77 (152% improvement)
References:
- /tmp/EPOCH1_NORM_FIX_VALIDATION_RESULTS.md
- /tmp/TWO_PHASE_TRAINING_FINAL_VALIDATION.md
- /tmp/ADAPTIVE_C51_FINAL_SUMMARY_AND_RECOMMENDATIONS.md
🤖 Generated with Claude Code
2025-11-22 20:10:20 +01:00
..
2025-11-11 23:48:02 +01:00
2025-11-22 19:21:51 +01:00
2025-11-11 23:48:02 +01:00
2025-10-29 19:52:21 +01:00
2025-11-05 02:21:58 +01:00
2025-10-19 09:10:55 +02:00
2025-09-24 23:47:21 +02:00
2025-11-11 23:48:02 +01:00
2025-11-11 23:48:02 +01:00
2025-10-15 21:38:04 +02:00
2025-11-22 19:21:51 +01:00
2025-11-03 10:15:09 +01:00
2025-11-18 23:51:44 +01:00
2025-11-11 23:48:02 +01:00
2025-10-19 09:10:55 +02:00
2025-09-28 22:24:49 +02:00
2025-11-22 19:21:51 +01:00
2025-11-14 08:47:34 +01:00
2025-11-05 02:21:58 +01:00
2025-10-23 09:16:58 +02:00
2025-11-11 23:48:02 +01:00
2025-11-11 23:48:02 +01:00
2025-10-19 09:10:55 +02:00
2025-10-10 23:05:26 +02:00
2025-10-19 09:10:55 +02:00
2025-10-19 09:10:55 +02:00
2025-11-22 19:21:51 +01:00
2025-11-11 23:48:02 +01:00
2025-10-19 09:10:55 +02:00
2025-11-18 13:53:59 +01:00
2025-11-03 10:15:09 +01:00
2025-10-10 23:05:26 +02:00
2025-10-24 01:11:43 +02:00
2025-11-11 23:48:02 +01:00
2025-10-25 15:36:57 +02:00
2025-10-19 09:10:55 +02:00
2025-11-22 20:10:20 +01:00
2025-11-05 02:21:58 +01:00
2025-10-10 23:05:26 +02:00
2025-10-24 01:11:43 +02:00
2025-10-03 07:34:26 +02:00
2025-09-24 23:47:21 +02:00
2025-10-19 09:10:55 +02:00
2025-10-19 09:10:55 +02:00
2025-10-10 23:05:26 +02:00
2025-11-11 23:48:02 +01:00
2025-10-18 01:11:14 +02:00
2025-10-01 21:24:28 +02:00
2025-11-18 23:51:44 +01:00
2025-11-18 13:53:59 +01:00
2025-10-14 09:06:37 +02:00
2025-10-24 01:11:43 +02:00
2025-09-24 23:47:21 +02:00
2025-09-24 23:47:21 +02:00
2025-11-19 23:14:04 +01:00
2025-10-19 09:10:55 +02:00
2025-10-24 01:11:43 +02:00
2025-11-05 02:21:58 +01:00
2025-10-01 00:00:51 +02:00
2025-10-23 09:16:58 +02:00
2025-09-24 23:47:21 +02:00
2025-10-01 21:24:28 +02:00
2025-10-10 23:05:26 +02:00
2025-10-10 23:05:26 +02:00
2025-11-05 02:21:58 +01:00
2025-11-11 23:48:02 +01:00
2025-10-01 21:48:25 +02:00
2025-11-11 23:48:02 +01:00
2025-10-19 09:10:55 +02:00
2025-10-19 09:10:55 +02:00
2025-09-27 20:56:22 +02:00
2025-10-03 07:34:26 +02:00
2025-10-01 21:24:28 +02:00
2025-10-03 07:34:26 +02:00
2025-10-11 18:39:19 +02:00
2025-10-19 09:10:55 +02:00
2025-10-01 21:24:28 +02:00
2025-10-01 21:24:28 +02:00