Skip to content

Utilize stats for predictions or any other PDF product#1504

Closed
scarlehoff wants to merge 8 commits into
remove_libNNPDF_LHAPDFSetfrom
utilize_stats_for_predictions
Closed

Utilize stats for predictions or any other PDF product#1504
scarlehoff wants to merge 8 commits into
remove_libNNPDF_LHAPDFSetfrom
utilize_stats_for_predictions

Conversation

@scarlehoff
Copy link
Copy Markdown
Member

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 stats class. I've looked around for instances where the mean was taken manually (for instance in effective exponents) or where the _rawdata of the predictions was being accessed and tried to use error_members or data depending 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:

diff = th_ct.central_value[:, np.newaxis] - th_ct._rawdata

Because I thought the _rawdata would 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.

@scarlehoff scarlehoff added destroyingc++ run-fit-bot Starts fit bot from a PR. labels Jan 27, 2022
@scarlehoff scarlehoff removed the run-fit-bot Starts fit bot from a PR. label Jan 28, 2022
@scarlehoff
Copy link
Copy Markdown
Member Author

The amount of places where python is being abused in many creative ways is making me go crazy.

@scarlehoff
Copy link
Copy Markdown
Member Author

This is exactly the kind of thing I was worried about @scarrazza @Zaharid.
I might start this PR anew with what I know now next week, starting with a number of test that can pick up all the silent problems I've been finding (this is just an obvious one, but I've been picking up quite a few this morning as I was testing)

matched_positivity_from_dataspecs1_plot_dataspecs_positivity.pdf

@scarlehoff scarlehoff closed this Jan 28, 2022
@scarlehoff scarlehoff deleted the utilize_stats_for_predictions branch November 14, 2024 10:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant