Skip to content

Conversation

seanohagan
Copy link

Adds a Bayesian PPI variant AI-powered Bayesian inference via ppi_py/ai_priors.py. Exposes functions sample_ai_posterior and calibrate_dp_alpha_empirical_coverage_estimate. Currently the calibration function is based on a coarse, low-fidelity grid search as high-fidelity calibration can be computationally intensive for this method.

Something to note is that the implementation is general and the sample_ai_posterior requires users to specify a loss function which is Callable. For parallel computation on the CPU to work, the function loss must be pickleable (i.e. defined at the top-level of a module). To overcome this and allow for lambda functions/nested functions/etc may require an additional dependency like cloudpickle.

Adds tests via tests/test_ai_priors.py and an example notebook on the galaxies dataset via examples/galaxies_aip.ipynb.

Uses examples/aip_utils.py solely to add code to make a plot in the example notebook. Could be potentially refactored out, with the code moved to the notebook itself or the existing plotting function to be suitably modified.

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

Successfully merging this pull request may close these issues.

1 participant