Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/eggplantbren/dnest5
Diffusive Nested Sampling like you've never seen it before
https://github.com/eggplantbren/dnest5
bayesian-inference markov-chain-monte-carlo nested-sampling statistics
Last synced: 24 days ago
JSON representation
Diffusive Nested Sampling like you've never seen it before
- Host: GitHub
- URL: https://github.com/eggplantbren/dnest5
- Owner: eggplantbren
- License: gpl-3.0
- Created: 2020-08-12T01:48:12.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2024-08-26T23:17:57.000Z (4 months ago)
- Last Synced: 2024-08-27T02:01:39.378Z (4 months ago)
- Topics: bayesian-inference, markov-chain-monte-carlo, nested-sampling, statistics
- Language: C++
- Homepage:
- Size: 145 KB
- Stars: 8
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
DNest5
======(c) 2020--2024 Brendon J. Brewer.
Please Clone Recursively
========================`$ git clone --recursive https://github.com/eggplantbren/DNest5`
This will pull in a submodule that I'm using.
LICENCE
=======GNU General Public License version 3.
Dependencies
============* Boost
* Python 3 with NumPy, matplotlib, apsw
* SQLite3
* yaml-cppInstallation
============To compile `DNest5`, run the build script. This generates a `Makefile` and
then runs `make` to compile everything.`$ ./build.py`
By default, this compiles the StraightLine example from
DNest4. The two executable
files created are `main`, which does the sampling, and `postprocess`, which
creates posterior samples and computes the marginal likelihood.Running and Outputs
===================First run `main`, then run `showresults.py` in Python. Showresults calls
`postprocess`, so you don't need to run `postprocess` on its own. It is safe
to run `showresults.py` while `main` is still running.Compiling a Different Model
===========================Edit `ModelType.hpp` and change the `#include` and `using` lines
to point to a different model. Then run `./build.py` again.At this time, all example models in the `Example` directory are implemented
using inheritance from the `UniformModel` class template.
These follow the convention where the exploration is done in terms of a coordinate system that makes the prior Uniform(0, 1) for every coordinate.
The user/model writer has to write the member functions `us_to_params` to
convert from the `us` (Uniform(0, 1) parameters) to the actual parameters,
and `log_likelihood` in order to evaluate the likelihood function.Specifying the Options
======================The configuration file `options.yaml` plays the role of DNest4's `OPTIONS`
and its command line arguments.Outputs
=======All outputs are written to the `output` directory. The files are:
* `dnest5.db`: An SQLite3 database of output, similar to DNest4's `sample.txt`,
`sample_info.txt`, and `levels.txt`, but combined into one binary file.
* `figure?.pdf`: Figures exported by `showresults.py`. Note that if you run
`showresults.py' while the main process is running, some inconsistencies
can appear in Figure 3 between the particles and the levels. These
do not have any major consequences.
* `posterior.db`: An SQLite3 database of posterior samples. Does not store
the samples themselves, but rather refers back to the appropriate rows
in `dnest5.db`.
* `posterior.csv`: CSV file of posterior samples.
* `results.yaml`: YAML file (plain text) with marginal likelihood values and
related things.