[Math] Add custom derivative for digamma function#21401
Open
guitargeek wants to merge 2 commits intoroot-project:masterfrom
Open
[Math] Add custom derivative for digamma function#21401guitargeek wants to merge 2 commits intoroot-project:masterfrom
digamma function#21401guitargeek wants to merge 2 commits intoroot-project:masterfrom
Conversation
The `digamma` function is important because it's the derivative of the log of the gamma function, which is widely used in likelihood fits because it appears in the Poisson distribution. If we want analytical Hessians, we also need to provide the analytical derivative of the digamma function, which is the trigamma function. Fortunately, we can find it in the GNU scientific library: https://www.gnu.org/software/gsl/doc/html/specfunc.html#trigamma-function
Test Results 22 files 22 suites 3d 3h 36m 14s ⏱️ For more details on these failures, see this check. Results for commit cdd7d17. |
vgvassilev
reviewed
Feb 27, 2026
Member
vgvassilev
left a comment
There was a problem hiding this comment.
Isn’t that worth adding directly to clad? We have a pr that I believe I pinged you about vgvassilev/clad#1733
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.
The
digammafunction is important because it's the derivative of the log of the gamma function, which is widely used in likelihood fits because it appears in the Poisson distribution. If we want analytical Hessians for RooFit likelihoods - as promised in the ROOT plan of work -, we also need to provide the analytical derivative of the digamma function, which is the trigamma function. Fortunately, we can find it in the GNU scientific library:https://www.gnu.org/software/gsl/doc/html/specfunc.html#trigamma-function