fix: train_walk_forward uses regime-stratified fold generation
Was calling generate_folds() (non-stratified) instead of generate_folds_stratified(). Walk-forward folds are now balanced across trending/ranging/volatile regimes. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -567,7 +567,7 @@ impl DQNTrainer {
|
||||
step_fraction: self.hyperparams.wf_step_fraction,
|
||||
};
|
||||
|
||||
let folds = wf_config.generate_folds(features.len());
|
||||
let folds = wf_config.generate_folds_stratified(training_data);
|
||||
let num_folds = folds.len();
|
||||
if num_folds == 0 {
|
||||
return Err(anyhow::anyhow!(
|
||||
|
||||
Reference in New Issue
Block a user