Utilize stats for predictions or any other PDF product#1504
Closed
scarlehoff wants to merge 8 commits into
Closed
Conversation
…used data / error_members
Member
Author
|
The amount of places where python is being abused in many creative ways is making me go crazy. |
Member
Author
|
This is exactly the kind of thing I was worried about @scarrazza @Zaharid. matched_positivity_from_dataspecs1_plot_dataspecs_positivity.pdf |
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.
As promised, now all PDFs are essentially the same (you asked for the PDF, you get the full PDF, no tricks) which obviously breaks compatibility with libNNPDF.
As a result everything has to be used through the
statsclass. I've looked around for instances where the mean was taken manually (for instance in effective exponents) or where the_rawdataof the predictions was being accessed and tried to useerror_membersordatadepending on what the question being asked was.All test pass, which is good (in some of the intermediate steps the regressions test were broken which mean they were picking up the changes) but this needs to be reviewed with a lot of care. Please have a go at #1501 since this builds on top of that one (both are actually not that much code, they are tricky because they touch basically the core of validphys).
The only thing I'm not sure about is lines like this one in the closure tests:
nnpdf/validphys2/src/validphys/closuretest/closure_results.py
Line 213 in a692709
Because I thought the
_rawdatawould be just the error members (being MC pdfs most of the time) but the tests only works with.data(so, including the central replica). I guess either I misunderstood what these functions were doing or there is something wrong somewhere else.