Add probability smoothing and increase regime temperatures#577
Open
Add probability smoothing and increase regime temperatures#577
Conversation
Chain features (chain_ball{n}) used actual drawn values during
training but predicted values at inference — an exposure-bias
mismatch that inflated test accuracy without improving real-world
performance. The multi-output stacking model already captures
cross-ball dependencies without this leakage.
Regularization tightened to reduce mode dominance:
- RF: max_depth 10→6, min_samples_leaf 5→20, min_samples_split 5→20
- HGBC: max_depth 6→4, min_samples_leaf 20→50
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Two changes to reduce mode dominance (Ball4=33 in every run): 1. Uniform mixture smoothing in _sample_from_proba: blends model probabilities with a uniform prior before temperature scaling (Dirichlet smoothing). Default prediction_smoothing=0.3 means 30% weight on uniform — reduces Ball4=33 from ~100% to ~45% probability per run. Configurable via prediction_smoothing key. Also fixes confidence reporting to reflect the actual post-scaling probability of the chosen class rather than raw model max. 2. Default regime temperatures raised from (0.6, 1.0, 1.4) to (0.8, 1.2, 1.6) for broader exploration without sacrificing low-entropy regime focus. Overridable via regime_temperatures key. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
prediction_smoothing=0.3): blends model probabilities with a uniform distribution (Dirichlet prior) before temperature scaling. Ball4=33 went from appearing in 10/10 runs to ~5/10. Configurable per game viaprediction_smoothingin config.regime_temperatureskey.Test plan
python lottery.py NJ_Pick6 --dry-run --force-retrainproduces diverse predictions with Ball4 varying across runs🤖 Generated with Claude Code