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

Add a sacc-less utility "likelihood" #195

Open
tilmantroester opened this issue Oct 19, 2022 · 1 comment
Open

Add a sacc-less utility "likelihood" #195

tilmantroester opened this issue Oct 19, 2022 · 1 comment

Comments

@tilmantroester
Copy link
Contributor

Right now the likelihoods in firecrown require a sacc object to compute anything. It would be nice to have a utility likelihood that takes in a list of ell (or theta) values, a collection of n(z), what kind of statistic should be computed, and then assembles a corresponding sacc object internally. That likelihood would then just compute the predicted data vector and not implement compute_chisq.
The use case I have in mind is model exploration and testing, for which a measured data vector and covariance is not necessary and adds an unnecessary burden on the user to set up a sacc object themselves.

@tilmantroester
Copy link
Contributor Author

I'd like to revisit this. Right now the GaussFamily likelihoods need a sacc file with a data vector and covariance. For model development and testing, this is not necessary and might be bothersome to obtain (especially the covariance).
I'd like a Likelihood class that just implements

  • read but only loops over the statistics and calls stat.read on them
  • compute_theory_vector
  • make_realization

It's not clear how to implement that cleanly with the current setup though. I think it would be natural to subclass Likelihood for this but both compute_theory_vector and make_realisation are already implemented in GaussFamily and wouldn't need to be changed. On the other hand, GaussFamily has a lot of other functionality that makes no sense if there are no data vectors or covariances. An option would be to have something like a TheoryOnlyLikelihood that is a subclass of Likelihood, which implements a rudimentary read, as well as compute_theory_vector and make_realisation. GaussFamily then subclasses TheoryOnlyLikelihood.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants