johannesulf/nautilus
소개
Neural Network-Boosted Importance Nested Sampling for Bayesian Statistics
과학 및 공학측정된 스타 증가
- in 24h
- 0
- in 7 days
- +1
- in 15 days
- +4
- in 1 month
- 기록 수집 중
서로 겹치는 기간의 순증가량이며 일별 합계가 아닙니다. 측정값이 없으면 비워 둡니다. 스타는 관심도를 나타내며 품질을 보장하지 않습니다.
README.md
Original
Nautilus is an MIT-licensed pure-Python package for Bayesian posterior and evidence estimation. It utilizes importance sampling and efficient space exploration using neural networks. Compared to traditional MCMC and Nested Sampling codes, it often needs fewer likelihood calls and produces much larger posterior samples. Additionally, nautilus is highly accurate and produces Bayesian evidence estimates with percent precision. It is widely used in many areas of astrophysical research.
Example
This example, sampling a 3-dimensional Gaussian, illustrates how to use nautilus.
import corner
import numpy as np
from nautilus import Prior, Sampler
from scipy.stats import multivariate_normal
prior = Prior()
for key in 'abc':
prior.add_parameter(key)
def likelihood(param_dict):
x = [param_dict[key] for key in 'abc']
return multivariate_normal.logpdf(x, mean=[0.4, 0.5, 0.6], cov=0.01)
sampler = Sampler(prior, likelihood)
sampler.run(verbose=True)
points, log_w, log_l = sampler.posterior()
corner.corner(points, weights=np.exp(log_w), labels='abc')
Installation
The most recent stable version of nautilus is listed in the Python Package Index (PyPI) and can be installed via pip.
pip install nautilus-sampler
Additionally, nautilus is also on conda-forge. To install via conda use the following command.
conda install -c conda-forge nautilus-sampler
Documentation
You can find the documentation at nautilus-sampler.readthedocs.io.
Attribution
A paper describing nautilus's underlying methods and performance has been published in the Monthly Notices of the Royal Astronomical Society. A draft of the paper is also available on arXiv. Please cite the paper if you find nautilus helpful in your research.
@article{nautilus,
author = {Lange, Johannes U},
title = "{nautilus: boosting Bayesian importance nested sampling with deep learning}",
journal = {Monthly Notices of the Royal Astronomical Society},
volume = {525},
number = {2},
pages = {3181-3194},
year = {2023},
month = {08},
doi = {10.1093/mnras/stad2441},
url = {https://doi.org/10.1093/mnras/stad2441},
eprint = {https://academic.oup.com/mnras/article-pdf/525/2/3181/51331635/stad2441.pdf},
}
License
Nautilus is licensed under the MIT License. The logo uses an image from the Illustris Collaboration.
관련 프로젝트 살펴보기
불러오는 중…