Skip to content
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

Quantile PDF reconstructions follow up work #148

Open
1 of 7 tasks
drewoldag opened this issue Jan 21, 2023 · 2 comments
Open
1 of 7 tasks

Quantile PDF reconstructions follow up work #148

drewoldag opened this issue Jan 21, 2023 · 2 comments
Assignees
Labels
bug Something isn't working parameterization new/upgraded PDF parameterization need

Comments

@drewoldag
Copy link
Collaborator

drewoldag commented Jan 21, 2023

@drewoldag drewoldag added the bug Something isn't working label Jan 21, 2023
@drewoldag drewoldag changed the title Fix the "foot" at the end of quantile PDF reconstructions Quantile PDF reconstructions follow up work Jan 25, 2023
@aimalz aimalz added the parameterization new/upgraded PDF parameterization need label Aug 31, 2023
@elts6570
Copy link
Collaborator

elts6570 commented Sep 20, 2023

We also see two issues a) with the PDF parameterization and b) the reconstruction prior to the point where the first quantile starts in our implementation here: https://github.com/LSSTDESC/bayesian-pipelines-cosmology/blob/photo-z/notebooks/photo-z/quantiles.py, when called as such: https://github.com/LSSTDESC/bayesian-pipelines-cosmology/blob/photo-z/notebooks/photo-z/qp_quantiles.ipynb.

@aimalz
Copy link
Collaborator

aimalz commented Oct 6, 2023

Temporary fix @elts6570 : When using the .convert_to() method, we should provide quantile values that aren't exactly 0 or 1, i.e. offset from those by a tiny number like 1e-15. The .pdf() method still gives wonky results, but they're not nearly as crazy.

A more comprehensive solution will entail:

  1. Checking for 0 or 1 in the input values to .ppf() and performing the above offset if necessary.
  2. Adding a check for inf values in the locs provided to quant_gen.
  3. Debugging the .pdf() method to prevent constant-valued stretches even for reconstruction options other than piecewise_constant.
  4. Debugging the .pdf() method to prevent negative values under piecewise_linear option.
  5. Adding a check that the CDF in between initially provided locs is equal to initially provided quants.

@drewoldag drewoldag removed their assignment Apr 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working parameterization new/upgraded PDF parameterization need
Projects
None yet
Development

No branches or pull requests

3 participants