Repository navigation
D1: final fit on all rows, early stopping, search space - #15
Merged
Merged
Conversation
…fore the fix) Mark D1 in progress; split the final retrain off as D1b (after B8). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…h space score_config() scores tuned and -hp hyperparameters on the same ten stratified splits with balanced weights, choosing the number of trees by early stopping unless given; fit_final() refits on every row with the same weights. max_depth 2-8, eta 0.005-0.3; no base_score, n_estimators or ASHA. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
TejusK123
added a commit
that referenced
this pull request
Oct 19, 2026
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
D1: final fit on all rows, early stopping, search space
The bugs (from the review)
-hppath saved a model fit on a stratified 80% split.max_depthcould only be 1–5 (tune.randint(1, 6)). The shipped model sits at 5, and the paper's "between 4 and 6" could not happen.base_scorewas tuned although it has no effect on a softmax model.n_estimatorswas tuned blindly (100–1000) alongside learning rates as low as 10⁻⁴.The fix (
boosted_forest_training.py)score_config()scores tuned and-hphyperparameters alike, on the same ten stratified 80/20 splits with balanced weights.n_estimatorsis given, a stratified fifth of each 80% is held out. Boosting stops when its weighted log-loss hasn't improved for 50 rounds, up to 3,000 trees. The mean over the ten splits becomesn_estimators.fit_final()refits the chosen configuration on all rows with balanced weights. That's the saved model.max_depth2–8,eta0.005–0.3 (log-uniform). Nobase_score, non_estimators, no scheduler.config.jsonrecords the number of trees and how the model was scored and fit.metrics.jsonholds the ten-split mean and SD for both paths.Decided with Tejus (19 Oct 2026):
alt_model_test.pyhas the same final-fit pattern; it's left for C1.Tests (
tests/test_final_fit.py, written first; all six failed before the fix)-hppaths, the saved model's trees equal a refit on all rows with balanced weights.-hpwithn_estimatorsuses it as given; without it, early stopping chooses.The existing seed, output and hyperparameter tests still pass.
Check (bundled data, 10 tuning rounds, seed 42, Apple M4)
Other checks
reanalysis.py: identical toreview/reanalysis_osx-arm64.txt. It doesn't use the training code.Results. Locally, with the testing folder: 156 passed. CI: see the checks below.
🤖 Generated with Claude Code