-
Notifications
You must be signed in to change notification settings - Fork 421
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add function to compute L2 norm of distributions #1321
Conversation
Thanks for this PR! The approach you took is to instead create one file (property.jl) and implement that property for many distributions in that file. I think I like this. |
I initially considered defining the methods in the distributions files, but development and testing is much faster:
compared to the >10 minutes for running the whole test suite, that's a 7500x improvement in productivity |
Codecov Report
@@ Coverage Diff @@
## master #1321 +/- ##
==========================================
+ Coverage 82.08% 82.14% +0.05%
==========================================
Files 115 116 +1
Lines 6577 6598 +21
==========================================
+ Hits 5399 5420 +21
Misses 1178 1178
Continue to review full report at Codecov.
|
Hm, @giordano, this takes me back - when was it that we discussed this, 2 years ago? Nice that you were still working on this! Indeed I like the Just to avoid duplication of effort in working out the integrals: I believe @RaphaelS1 and @aintoha have worked out a couple of these (entropy and cross-entropy/interaction terms) for various scoring rules, and there are also a number of other papers which have lists of integrals, e.g., for energy scores and integrated Brier (which @RaphaelS1 and @aintoha can point to). Regarding the naming discussion: there is on occasion a bit of terminology confusion between Brier/Gneiting loss ( |
PS: I'm happy to help implement the squared L1 norm of the pdf for the most popular distributions if anyone wants that. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Two minor suggestions, otherwise the PR looks good.
Co-authored-by: David Widmann <devmotion@users.noreply.github.com>
Co-authored-by: David Widmann <devmotion@users.noreply.github.com>
Bump 🙂 |
Sorry for the delay, I wanted to make sure that people have time to comment on it but then I completely forgot the PR 🙂 |
This implements the L2 norm of some distributions, as requested in #806. I started with continuous univariate distributions for which I was able to work out the integral. The default method throws an error explaining that the function isn't implemented for the given distribution, but other methods can be added later. CC: @ablaom @fkiraly