Repository navigation
Port upstream stochtree fixes through 2026-10-05 - #16
Merged
Merged
Conversation
Ports StochasticTree/stochtree StochasticTree#417, StochasticTree#418, StochasticTree#420, StochasticTree#421 and the exact-posterior MCMC test from StochasticTree#431. The cloglog active-forest initializer no longer reads an uninitialized starting value; seeded draws are bitwise unchanged. The Eigen 5 upgrade is deliberately not ported (see NASH-FORK.md). 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.
Reviews upstream
StochasticTree/stochtreemainup to 737f397 (5 Oct 2026) and ports the changes that apply to nashtree. The fork point is upstream 5c09ac7 (22 Jul 2026). Of upstream's 18 commits since then, four are our own sampler fixes (upstream StochasticTree#425–StochasticTree#428), which nashtree already has.Ported
initialize_forest_model_active_forest_cppnow reads the starting value. Before,bart()with a cloglog link set the root leaves from an uninitializedinit_val.initialize_forest_model_cppalso accepts cloglog now.init_valandleaf_scalestart at 0.0.Log::Fatalis[[noreturn]].tests/testthat/test-mcmc-exact-posterior.R, unchanged from upstream. One tree on four points has a posterior over leaf counts that can be enumerated exactly. A 100k-draw chain must match it within one percentage point, with the covariate in ascending and descending order. This guards the grow/prune and extrema fixes.Version bumped to 0.4.6.9012. NEWS and NASH-FORK.md updated.
Not ported
Eigen::placeholders::all(9c4dcd4, only needed under Eigen 5). It would replace the bundled linear-algebra library for no functional gain and puts bitwise-reproducible refits at risk..gitmodules, Python tests, upstream NEWS and contributor credits: these don't apply to the generated R package.std::lgammainstead ofboost::math::lgamma): not merged upstream, and it could change the last bits of the variance-forest marginal likelihood.Evidence (Apple silicon)
NOT_CRAN=trueon an installed scratch build: 2,148 expectations, 0 failures, 0 errors, 2 skips. That's the existing 2,145 plus the 3 new checks. All existing bitwise fixtures pass, including the cloglog ones inoutcome-paths-reference.rds.main(4ccb569) with this branch on the same seeds. These were bitwise identical: the outcome reference set (Gaussian, weighted, variance forest, probit with random effects, cloglog binary and ordinal), twelve more cloglog fits (binary and ordinal, started from the root and from GFR draws) and an NB fit. So in practice the uninitialized value happened to be harmless here. The fix removes undefined behaviour without changing draws.Not checked: Linux and curbcut-1 builds. nash's pin is unaffected until it moves.
🤖 Generated with Claude Code