-
Notifications
You must be signed in to change notification settings - Fork 7
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
Add support for posterior predictive distributions #323
Comments
This is already supported by NumCosmo's connector. Moreover, in Augur you can find code to do that, see for example srd_y1_3x2_like.py, where they generate a data vector from a theory vector and build a likelihood to be used by any framework. |
@tilmantroester is there something that Augur does, or something part of what it does, that you thing should be moved from Augur to Firecrown? |
There are two reasons why I think this should be in firecrown: |
The ability to return data vectors is also useful for general debugging, and I'd recommend saving the information to do this. However, in cosmosis I did find that the one case where this was slow compared to likelihood evaluations was Supernovae, so perhaps make it optional? |
The CosmoSIS connector presently includes a section in the DataBlock labeled data_vector. This section contains three elements: This behavior is automatically enabled for GaussFamily likelihoods, but the current implementation is not considered ideal. We are working to refine this process, with the goal of achieving the same outcome using Furthermore, as pointed out by @joezuntz, including a lengthy theory vector in the output chains can have a detrimental impact on processing speed. In NumCosmo, any data added to the output chains undergoes further processing, which includes computing statistics such as mean, variance, autocorrelation, and more. Additionally, including an extensive theory vector in the output would not only significantly slow down these processing tasks but also result in exceptionally large output files. Thus, I think we should make this behavior optional and eventually move to a more general solutions using |
At this point I'm not too concerned about how this gets piped back to the sampling frameworks. For now I imagine just implementing a method As you said, treating theory or mock data vectors as derived parameters and dumping them into the chain output is at best cumbersome and at worst breaks the IO. |
Samplers in CosmoSIS (or scripts using it interactively) can fully access the data block containing all the products of a pipeline, including the data vectors, so yes, this is already there. It's used in the Fisher sampler, for example. |
Sorry, what I meant was, is there a way to efficiently save parts of the data block while sampling, independently of the default chain output. |
Oh, I see. You can specify a vector output for extra_output, if you know the length in advance, by doing, e.g. for a length 222 data vector, |
This requires functionality to draw samples of data vectors from the likelihood and passing them back to the sampling framework.
The ability to draw samples from the likelihood is useful in other contexts as well, such as generating mock data vectors.
The text was updated successfully, but these errors were encountered: