Giter Club home page Giter Club logo

ultranest's Introduction

UltraNest

Fit and compare complex models reliably and rapidly with advanced sampling techniques.

https://circleci.com/gh/JohannesBuchner/UltraNest/tree/master.svg?style=shield Documentation Status Github repository Software paper

Correctness. Speed. Ease of use. ๐Ÿฆ”

About

When scientific models are compared to data, two tasks are important: 1) contraining the model parameters and 2) comparing the model to other models. Different techniques have been developed to explore model parameter spaces. This package implements a Monte Carlo technique called nested sampling.

Nested sampling allows Bayesian inference on arbitrary user-defined likelihoods. In particular, posterior probability distributions on model parameters are constructed, and the marginal likelihood ("evidence") Z is computed. The former can be used to describe the parameter constraints of the data, the latter can be used for model comparison (via Bayes factors) as a measure of the prediction parsimony of a model.

In the last decade, multiple variants of nested sampling have been developed. These differ in how nested sampling finds better and better fits while respecting the priors (constrained likelihood prior sampling techniques), and whether it is allowed to go back to worse fits and explore the parameter space more.

This package develops novel, advanced techniques for both (See How it works). They are especially remarkable for being free of tuning parameters and theoretically justified. Beyond that, UltraNest has support for Big Data sets and high-performance computing applications.

UltraNest is intended for fitting complex physical models with slow likelihood evaluations, with one to hundreds of parameters. UltraNest intends to replace heuristic methods like multi-ellipsoid nested sampling and dynamic nested sampling with more rigorous methods. UltraNest also attempts to provide feature parity compared to other packages (such as MultiNest).

You can help by testing UltraNest and reporting issues. Code contributions are welcome. See the Contributing page.

Features

  • Pythonic
    • pip and conda installable
    • Easy to program for: Sanity checks with meaningful errors
    • Can control the run programmatically and check status
    • Reasonable defaults, but customizable
    • Thoroughly tested with many unit and integration tests
    • NEW: supports likelihood functions written in Python, C, C++, Fortran, Julia and R
  • Robust exploration easily handles:
    • Degenerate parameter spaces such as bananas or tight correlations
    • Multiple modes/solutions in the parameter space
    • Robust, parameter-free MLFriends algorithm (metric learning RadFriends, Buchner+14,+19), with new improvements (region follows new live points, clustering improves metric iteratively, NEW in v4.0: refined local metric).
    • High-dimensional problems with hit-and-run sampling
    • Wrapped/circular parameters, derived parameters
    • Fast-slow parameters
  • Lightweight and fast
  • Advanced visualisation and crash recovery:
    • Live view of the exploration for Jupyter notebooks and terminals
    • Publication-ready visualisations
    • Corner plots, run and parameter exploration diagnostic plots
    • Checkpointing and resuming, even with different number of live points
    • Warm-start: resume from modified data / model
  • strategic nested sampling
    • can vary (increase) number of live points (akin to dynamic nested sampling, but with different targets)
    • can sample clusters optimally (e.g., at least 50 points per cluster/mode/solution)
    • can target minimizing parameter estimation uncertainties
    • can target a desired evidence uncertainty threshold
    • can target a desired number of effective samples
    • or any combination of the above
    • Robust ln(Z) uncertainties by bootstrapping live points.

Usage

Licence

How to cite UltraNest.

GPLv3 (see LICENCE file). If you require another license, please contact me.

The cute hedgehog icon was made by Freepik. It symbolises UltraNest's approach of carefully walking up a likelihood, ready to defend against any encountered danger.

Contributors

ultranest's People

Contributors

johannesbuchner avatar jacopok avatar facero avatar warrickball avatar ahnitz avatar gregorydavidmartinez avatar smirngreg avatar adipol-ph avatar nsusemiehl avatar qzgao avatar svaverbe avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.