Replaces the ad-hoc scattered fold-boundary reset calls with a single registry-driven iteration. Adding new fold-reset state now requires adding a registry entry AND a dispatch arm in reset_named_state in the same commit (Invariant 2 Wire-It-Up). Step 3.4 correction: plan_state entry removed from the registry — plan_state_buf exists only in GpuBacktestEvaluator (val path), not in the training-path fused ctx. No training-side fold reset is applicable. New behaviour: isv_learning_health, isv_sharpe_ema, isv_q_means are now properly reset to baseline at each fold boundary (previously unset, which allowed signals from fold N to bias fold N+1 initialisation). Tests: 3 registry unit tests pass; cargo check -p ml clean (8 pre-existing warnings only, no new). Authority: spec §4.A.1. Plan 1 Task 3. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
ml
10-model ML ensemble for the Foxhunt HFT system, built on Candle v0.9.1.
Models
- DQN (Rainbow) — deep Q-network with prioritized replay, dueling heads, noisy nets
- PPO — proximal policy optimization with GAE, LSTM policies, clip-higher
- TFT — temporal fusion transformer for multi-horizon forecasting
- Mamba2 — state space model for sequence prediction
- Liquid Networks — biologically inspired networks for non-stationary data
- TLOB — transformer-based limit order book analysis
- KAN — Kolmogorov-Arnold networks
- xLSTM — extended LSTM architecture
- TGGN — temporal graph neural network
- Diffusion — diffusion-based generative model
Key Modules
ensemble— model ensemble coordination and confidence aggregationhyperopt— PSO-based hyperparameter optimization with per-model adapterstrainers— unified training loops (DQN, PPO, supervised)inference—InferenceAdaptertrait for predictioncheckpoint— model checkpointing and restorationevaluation— walk-forward evaluation pipeline
Usage
use ml::dqn::DQN;
use ml::ppo::PpoTrainer;