Package: margarine
Introductionmargarine:Marginal Bayesian StatisticsAuthors:Harry T.J. BevinsVersion:1.2.3Homepage:https://github.com/htjb/margarineDocumentation:https://margarine.readthedocs.io/InstallationThe software should be installed via the git repository using the following
commands in the terminalgitclonehttps://github.com/htjb/margarine.git# or the equivalent using ssh keyscdmargarinepythonsetup.pyinstall--useror via a pip install withpipinstallmargarineNote that the pip install is not always the most up to date version of the code.Details/Examplesmargarineis designed to make the calculation of marginal bayesian statistics
feasible given a set of samples from an MCMC or nested sampling run.An example of how to use the code can be found on the github in the
jupyter notebooknotebook/Tutorial.ipynbor alternatively athere.DocumentationThe documentation is available at:https://margarine.readthedocs.io/To compile it locally you can runcddocssphinx-buildsourcehtml-buildafter cloning the repo and installing the relevant packages withpipinstallsphinxnumpydocsphinx_rtd_themeLicence and CitationThe software is available on the MIT licence.If you use the code for academic purposes we request that you cite the followingpaperand
theMaxEnt22 proceedingsIf you use the clustering implementation please cite the followingpreprint.
You can use the following bibtex@ARTICLE{2023MNRAS.526.4613B,author={{Bevins}, Harry T.~J. and {Handley}, William J. and {Lemos}, Pablo and {Sims}, Peter H. and {de Lera Acedo}, Eloy and {Fialkov}, Anastasia and {Alsing}, Justin},title="{Marginal post-processing of Bayesian inference products with normalizing flows and kernel density estimators}",journal={\mnras},keywords={methods: data analysis, methods: statistical, cosmic background radiation, dark ages, reionization, first stars, Astrophysics - Instrumentation and Methods for Astrophysics, Astrophysics - Cosmology and Nongalactic Astrophysics, Computer Science - Machine Learning},year=2023,month=dec,volume={526},number={3},pages={4613-4626},doi={10.1093/mnras/stad2997},archivePrefix={arXiv},eprint={2205.12841},primaryClass={astro-ph.IM},adsurl={https://ui.adsabs.harvard.edu/abs/2023MNRAS.526.4613B},adsnote={Provided by the SAO/NASA Astrophysics Data System}}and@ARTICLE{2022arXiv220711457B,author={{Bevins}, Harry and {Handley}, Will and {Lemos}, Pablo and {Sims}, Peter and {de Lera Acedo}, Eloy and {Fialkov}, Anastasia},title="{Marginal Bayesian Statistics Using Masked Autoregressive Flows and Kernel Density Estimators with Examples in Cosmology}",journal={arXiv e-prints},keywords={Astrophysics - Cosmology and Nongalactic Astrophysics, Astrophysics - Instrumentation and Methods for Astrophysics},year=2022,month=jul,eid={arXiv:2207.11457},pages={arXiv:2207.11457},archivePrefix={arXiv},eprint={2207.11457},primaryClass={astro-ph.CO},adsurl={https://ui.adsabs.harvard.edu/abs/2022arXiv220711457B},adsnote={Provided by the SAO/NASA Astrophysics Data System}}and@ARTICLE{2023arXiv230502930B,author={{Bevins}, Harry and {Handley}, Will},title="{Piecewise Normalizing Flows}",journal={arXiv e-prints},keywords={Statistics - Machine Learning, Computer Science - Machine Learning},year=2023,month=may,eid={arXiv:2305.02930},pages={arXiv:2305.02930},doi={10.48550/arXiv.2305.02930},archivePrefix={arXiv},eprint={2305.02930},primaryClass={stat.ML},adsurl={https://ui.adsabs.harvard.edu/abs/2023arXiv230502930B},adsnote={Provided by the SAO/NASA Astrophysics Data System}}RequirementsThe code requires the following packages to run:numpytensorflowscipyTo compile the documentation locally you will need:sphinxnumpydocTo run the test suit you will need:pytestContributingContributions and suggestions for areas of development are welcome and can
be made by opening a issue to report a bug or propose a new feature for discussion.