[RF][RS] Unify BayesianCalculator::GetInterval() 1D and ND code paths#21994
Merged
guitargeek merged 1 commit intoroot-project:masterfrom Apr 23, 2026
Merged
[RF][RS] Unify BayesianCalculator::GetInterval() 1D and ND code paths#21994guitargeek merged 1 commit intoroot-project:masterfrom
BayesianCalculator::GetInterval() 1D and ND code paths#21994guitargeek merged 1 commit intoroot-project:masterfrom
Conversation
For models with a single POI and no nuisance parameters, `BayesianCalculator::GetInterval()` used `ComputeIntervalUsingRooFit()`, which built the CDF via `RooAbsPdf::createCdf()` On a computation graph that contains the NLL. The `createCdf()` relies on cloning the integrand subtree and substituting the POI with a prime variable, but the POI dependency inside the NLL compiled for the new vectorizing CPU evaluation backend is not propagated through the clone. The CDF and therefore the calculated interval is then wrong. Users worked around this by calling `SetScanOfPosterior(N)` instead (see root-project#17567). Fortunately, there was already a code path for the n-dimensional parameter case present that doesn't use `createCdf()`, but the ROOT Math integrator classes directly. This commit commit suggests to also do this for the 1D POI-only case to avoid the issue with using the compiled NLL in `createCdf()` and simplifying the code by only providing one code path for interval caluclation with integration. Add a gtest regression test that reproduces the issue scenario and checks the default-path upper limit matches the explicit scan reference. Closes root-project#17567.
1 task
Test Results 22 files 22 suites 3d 10h 11m 9s ⏱️ Results for commit 0538159. |
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.
For models with a single POI and no nuisance parameters,
BayesianCalculator::GetInterval()usedComputeIntervalUsingRooFit(), which built the CDF viaRooAbsPdf::createCdf()On a computation graph that contains the NLL. ThecreateCdf()relies on cloning the integrand subtree and substituting the POI with a prime variable, but the POI dependency inside the NLL compiled for the new vectorizing CPU evaluation backend is not propagated through the clone. The CDF and therefore the calculated interval is then wrong. Users worked around this by callingSetScanOfPosterior(N)instead (see #17567).Fortunately, there was already a code path for the n-dimensional parameter case present that doesn't use
createCdf(), but the ROOT Math integrator classes directly. This commit commit suggests to also do this for the 1D POI-only case to avoid the issue with using the compiled NLL increateCdf()and simplifying the code by only providing one code path for interval caluclation with integration.Add a gtest regression test that reproduces the issue scenario and checks the default-path upper limit matches the explicit scan reference.
Closes #17567.