mirror of
https://github.com/webclinic017/drift.git
synced 2026-08-18 21:38:09 +00:00
fix(MetaLabeling): previously misinterpreted meta-labeling, now also multiplying base model's prediction with the meta model's prediction (#193)
* fix(MetaLabeling): previously misinterpreted meta-labeling, now also multiplying base model's prediction with the meta model's prediction * fix(Evaluate): print results * fix(Evaluate): make sure we have numerical stability in returns * fix(Inference): only output and print stats in training mode * fix(Evaluate): don't add miniscule amount to result
This commit is contained in:
+1
-1
@@ -69,7 +69,7 @@ def __run_training(config: Config) -> PipelineOutcome:
|
||||
bet_sizing_outcomes = [bet_sizing_with_meta_models(X, outcome.predictions, y, forward_returns, config.meta_models, config, 'meta', None, None, None) for outcome in directional_training_outcome.training]
|
||||
|
||||
# 4. Ensemble weights
|
||||
ensemble_outcome = ensemble_weights([o.weights for o in bet_sizing_outcomes], forward_returns, y, config.no_of_classes)
|
||||
ensemble_outcome = ensemble_weights([o.weights for o in bet_sizing_outcomes], forward_returns, y, config.no_of_classes, config.mode == 'training')
|
||||
|
||||
# 5. (Optional) Additional bet sizing on top of the ensembled weights
|
||||
ensemble_bet_sizing_outcome = bet_sizing_with_meta_models(X, ensemble_outcome.weights, y, forward_returns, config.meta_models, config, 'ensemble', None, None, None) if len(config.meta_models) > 0 else None
|
||||
|
||||
Reference in New Issue
Block a user