Standard HPO patterns break down on financial labels with overlap. GridSearchCV and RandomizedSearchCV waste trials, cannot stop after the first PurgedKFold fold, and do not persist state for crash recovery or parallel workers. The result is excess compute, biased validation from leakage, and fragile experiments.
Optuna fits this domain when wired to a strict data contract: X/y aligned to event times, PurgedKFold as the only splitter, and separate weights for training (uniqueness) versus scoring (return attribution). A WeightedEstimator wrapper keeps weight computation inside the estimator so the objective stays focused on CV.
A workable setup: TPE sampling, fold-level reporting for pruning, Hyperband allocation across trials, SQLite storage with resume, plus a suggester that maps sklearn distributions to trial.suggest_* and treats weight scheme and decay as...
👉 Read | CodeBase | @mql5dev
#MQL5 #MT5 #Optuna
Optuna fits this domain when wired to a strict data contract: X/y aligned to event times, PurgedKFold as the only splitter, and separate weights for training (uniqueness) versus scoring (return attribution). A WeightedEstimator wrapper keeps weight computation inside the estimator so the objective stays focused on CV.
A workable setup: TPE sampling, fold-level reporting for pruning, Hyperband allocation across trials, SQLite storage with resume, plus a suggester that maps sklearn distributions to trial.suggest_* and treats weight scheme and decay as...
👉 Read | CodeBase | @mql5dev
#MQL5 #MT5 #Optuna
❤36👌4
Part 8 folds the Optuna HPO system into the production training stack, resulting in one ModelDevelopmentPipeline that can run either sklearn search (Grid/RandomizedSearchCV) or Optuna via a single model_params flag.
The Optuna path jointly samples hyperparameters and sample-weight design (scheme, decay, linearity), adds early stopping with Hyperband pruning, and persists studies in SQLite for crash-safe resume. Primary vs secondary (meta-labeling) training is detected by the presence of side in events, which controls meta-feature generation and artifact naming.
Inference reliability is improved by storing the fitted column-dropping preprocessor (constant/duplicate removal) as step 0 of the final sklearn Pipeline, preventing silent feature misalignment.
Post-HPO ensembling supports sequential bootstrapped bagging to reduce correlated bags under overlapping tr...
👉 Read | AlgoBook | @mql5dev
#MQL5 #MT5 #Optuna
The Optuna path jointly samples hyperparameters and sample-weight design (scheme, decay, linearity), adds early stopping with Hyperband pruning, and persists studies in SQLite for crash-safe resume. Primary vs secondary (meta-labeling) training is detected by the presence of side in events, which controls meta-feature generation and artifact naming.
Inference reliability is improved by storing the fitted column-dropping preprocessor (constant/duplicate removal) as step 0 of the final sklearn Pipeline, preventing silent feature misalignment.
Post-HPO ensembling supports sequential bootstrapped bagging to reduce correlated bags under overlapping tr...
👉 Read | AlgoBook | @mql5dev
#MQL5 #MT5 #Optuna
❤35🔥5👍4