Open drewoldag opened 1 year ago
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.
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:
.ppf()
and performing the above offset if necessary.inf
values in the locs
provided to quant_gen
..pdf()
method to prevent constant-valued stretches even for reconstruction options other than piecewise_constant
..pdf()
method to prevent negative values under piecewise_linear
option.locs
is equal to initially provided quants
.
quant_pdf.pad_quantiles
.dual_spline_average
pdf constructor.quantile_distribution_demo
notebook more beautiful.quant_gen
class to becdf_spline_derivative
and update associated unit tests.