-
Notifications
You must be signed in to change notification settings - Fork 4
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
"Shift" parameterization #96
Comments
Yes - I was writing up and soliciting feedback a detailed use case and context: This issue concerns the needs of firecrown to marginalise over n(z) uncertainties during sampling. If the described functionality does not yet exist in qp, there is a discussion to be had if the functionality we have in mind should be implemented in qp or in firecrown. I’m not familiar with the qp terminology, so to avoid confusion with existing terms, I shall call the object that holds the information on the n(z) and its uncertainties just the At each sampling step, firecrown ultimately needs a tuple of arrays The parameters that govern the generation of the n(z) should ideally be interpreted in terms of the uncertainty of the n(z). So a The basic API for accounting for n(z) systematics in firecrown at the moment is basically For the simple shift parameterisation, we have something like (based on the firecrown implementation) def generate_nz(nz_params, nz):
dndz_interp = Akima1DInterpolator(nz.z_array, nz.nz_array)
new_nz_array = dndz_interp(z_array - nz_params["delta_z"], extrapolate=False)
new_nz_array[np.isnan(new_nz_array)] = 0.0
return NZ(new_nz_array, z_array) What I have in mind to get there is
In pseudo-code, for the simplistic shifting approach (we would eventually want something more sophisticated): # During setup at the beginning of the run
qp = QP.from_sacc(sacc_file, tracer_name)
# ...
# During sampling
nz_array, z_array = qp.parametric_sample(mode="shift", delta_z=0.42)
# ... |
Another place where we can experiment with error parameterizations is this code related to the BP TT's STAR efforts. The suggestion in today's telecon was to use the means and standard deviations of a Gaussian mixture model, which is already entirely implemented in qp. (So I don't forget, @jecampagne may have additional code to enhance that example.) @EiffL had some additional thoughts to add in a follow-up comment. |
There are two aspects to this. One is to deterministically sample n(z)'s, based on some parameters. In the BP example, that'd be the The other aspect is to define priors on these parameters. These priors should be informed by the uncertainty of the n(z). Ideally, the firecrown sampler doesn't need to know about the specifics of these priors and can just sample from a ~fixed distribution, e.g. uniformly between 0 and 1. I mocked this up here: https://colab.research.google.com/drive/1ie1ZIR-iuAr8owBgh7s5Ap0LPUE1xtOr?usp=sharing The question is how much of this functionality can be abstracted away in qp and what should be implemented on the firecrown side. The shift parametrisation is easy enough to deal with but it gets more complicated with more sophisticated approaches. |
This issue is subsumed by #99 so I'm closing this one but linking it there so the discussion is still accessible. |
@EiffL has provided a use case for the shift parameterization in the context of the BP TT. @tilmantroester is this consistent with what you had in mind?
The text was updated successfully, but these errors were encountered: