[RF] Compute global correlations for external covariance matrices - #23245
Open
guitargeek wants to merge 1 commit into
Open
[RF] Compute global correlations for external covariance matrices#23245guitargeek wants to merge 1 commit into
guitargeek wants to merge 1 commit into
Conversation
When the covariance matrix of a fit result is set via
RooFitResult::setCovarianceMatrix(), as happens for weighted fits with
the SumW2Error or AsymptoticError corrections, the global correlation
coefficients were left unset. RooFitResult::globalCorr() then silently
returned zero for every parameter, and Print("v") showed "<none>".
Compute the global correlation coefficients directly from the provided
matrix, using rho_k^2 = 1 - 1/[V_kk * (V^-1)_kk] = 1 - 1/(C^-1)_kk. For
a matrix coming out of a regular fit this reproduces the values reported
by Minuit exactly, as checked by the new test.
Also fill the legacy global-correlation list in printMultiline() when
possible, so that verbose printing shows the global correlations without
requiring a prior call to one of the globalCorr() accessors.
Closes root-project#12935.
🤖 Done with the help of AI
Test Results 23 files 23 suites 3d 15h 21m 54s ⏱️ For more details on these failures, see this check. Results for commit 204dcef. |
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.
When the covariance matrix of a fit result is set via RooFitResult::setCovarianceMatrix(), as happens for weighted fits with the SumW2Error or AsymptoticError corrections, the global correlation coefficients were left unset. RooFitResult::globalCorr() then silently returned zero for every parameter, and Print("v") showed "".
Compute the global correlation coefficients directly from the provided matrix, using rho_k^2 = 1 - 1/[V_kk * (V^-1)_kk] = 1 - 1/(C^-1)_kk. For a matrix coming out of a regular fit this reproduces the values reported by Minuit exactly, as checked by the new test.
Also fill the legacy global-correlation list in printMultiline() when possible, so that verbose printing shows the global correlations without requiring a prior call to one of the globalCorr() accessors.
Closes #12935.
🤖 Done with the help of AI