-
Notifications
You must be signed in to change notification settings - Fork 25
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 Moment Morph Interpolation #229
Conversation
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## main #229 +/- ##
==========================================
+ Coverage 92.59% 93.53% +0.94%
==========================================
Files 50 52 +2
Lines 2120 2429 +309
==========================================
+ Hits 1963 2272 +309
Misses 157 157
☔ View full report in Codecov by Sentry. |
fce5373
to
9a46645
Compare
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.
This looks good aside from readability in the tests, would be great if the test case data would be easier to read, e.g. by factoring out some functions to reduce the nesting levels.
This is a new version of #221 that gets rid of most classes. It thus supersedes #221. @maxnoe's comments in #221 were included in this version
This PR introduces another interpolation method (Moment Morphing, see [1]). While performing comparably to the already existing Quantile Interpolation the main points in favor of this method is that it can be can be separated into two steps. First, one has to compute interpolation coefficients and then these are used to morph and interpolate the input pdfs. When changing the coefficients (e.g. changing interpolation to extrapolation or changing from interpolation in a triangle to interpolation in a rectangle) the second part remains unchanged. Consequently, using this for extrapolation is quite simple.
This PR is quite extensive in its additions. Most of these are actually tests, checking all kind of broadcasting and border cases.
[1] M. Baak, S. Gadatsch, R. Harrington and W. Verkerke (2015). Interpolation between multi-dimensional histograms using a new non-linear moment morphing method. Nucl. Instrum. Methods Phys. Res. A 771, 39-48. https://doi.org/10.1016/j.nima.2014.10.033