All Projects → nchopin → Particles

nchopin / Particles

Licence: mit
Sequential Monte Carlo in python

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Particles

Probabilistic robotics
solution of exercises of the book "probabilistic robotics"
Stars: ✭ 734 (+443.7%)
Mutual labels:  bayesian-inference, kalman-filter
Vbmc
Variational Bayesian Monte Carlo (VBMC) algorithm for posterior and model inference in MATLAB
Stars: ✭ 123 (-8.89%)
Mutual labels:  bayesian-inference
Simdkalman
Python Kalman filters vectorized as Single Instruction, Multiple Data
Stars: ✭ 105 (-22.22%)
Mutual labels:  kalman-filter
Bcpd
Bayesian Coherent Point Drift (BCPD/BCPD++); Source Code Available
Stars: ✭ 116 (-14.07%)
Mutual labels:  bayesian-inference
Gpstuff
GPstuff - Gaussian process models for Bayesian analysis
Stars: ✭ 106 (-21.48%)
Mutual labels:  bayesian-inference
Statespacemodels.jl
StateSpaceModels.jl is a Julia package for time-series analysis using state-space models.
Stars: ✭ 116 (-14.07%)
Mutual labels:  kalman-filter
Neural Tangents
Fast and Easy Infinite Neural Networks in Python
Stars: ✭ 1,357 (+905.19%)
Mutual labels:  bayesian-inference
Glmm In Python
Generalized linear mixed-effect model in Python
Stars: ✭ 131 (-2.96%)
Mutual labels:  bayesian-inference
Exoplanet
Fast & scalable MCMC for all your exoplanet needs!
Stars: ✭ 122 (-9.63%)
Mutual labels:  bayesian-inference
Kvae
Kalman Variational Auto-Encoder
Stars: ✭ 115 (-14.81%)
Mutual labels:  kalman-filter
A Nice Mc
Code for "A-NICE-MC: Adversarial Training for MCMC"
Stars: ✭ 115 (-14.81%)
Mutual labels:  bayesian-inference
Numpy Ml
Machine learning, in numpy
Stars: ✭ 11,100 (+8122.22%)
Mutual labels:  bayesian-inference
Bayesiantracker
Bayesian multi-object tracking
Stars: ✭ 121 (-10.37%)
Mutual labels:  kalman-filter
Multitarget Tracker
Multiple Object Tracker, Based on Hungarian algorithm + Kalman filter.
Stars: ✭ 1,621 (+1100.74%)
Mutual labels:  kalman-filter
Aboleth
A bare-bones TensorFlow framework for Bayesian deep learning and Gaussian process approximation
Stars: ✭ 127 (-5.93%)
Mutual labels:  bayesian-inference
Quant
Codera Quant is a Java framework for algorithmic trading strategies development, execution and backtesting via Interactive Brokers TWS API or other brokers API
Stars: ✭ 104 (-22.96%)
Mutual labels:  kalman-filter
Bopp
BOPP: Bayesian Optimization for Probabilistic Programs
Stars: ✭ 112 (-17.04%)
Mutual labels:  bayesian-inference
Rethinking Pyro
Statistical Rethinking with PyTorch and Pyro
Stars: ✭ 116 (-14.07%)
Mutual labels:  bayesian-inference
Mrbayes
MrBayes is a program for Bayesian inference and model choice across a wide range of phylogenetic and evolutionary models. For documentation and downloading the program, please see the home page:
Stars: ✭ 131 (-2.96%)
Mutual labels:  bayesian-inference
Libcluster
An extensible C++ library of Hierarchical Bayesian clustering algorithms, such as Bayesian Gaussian mixture models, variational Dirichlet processes, Gaussian latent Dirichlet allocation and more.
Stars: ✭ 129 (-4.44%)
Mutual labels:  bayesian-inference

particles

Sequential Monte Carlo in python.

Motivation

This package was developed to complement the following book:

An introduction to Sequential Monte Carlo

by Nicolas Chopin and Omiros Papaspiliopoulos.

Features

  • particle filtering: bootstrap filter, guided filter, APF.

  • resampling: multinomial, residual, stratified, systematic and SSP.

  • possibility to define state-space models using some (basic) form of probabilistic programming; see below for an example.

  • SQMC (Sequential quasi Monte Carlo); routines for computing the Hilbert curve, and generating RQMC sequences.

  • particle smoothing: fixed-lag smoothing, on-line smoothing, FFBS (forward filtering, backward sampling), two-filter smoothing (O(N) and O(N^2) variants). FFBS for SQMC is also implemented.

  • Exact filtering/smoothing algorithms: Kalman (for linear Gaussian models) and forward-backward recursions (for finite hidden Markov models).

  • SMC samplers: SMC tempering, IBIS (a.k.a. data tempering).

  • Bayesian parameter inference for state-space models: PMCMC (PMMH, Particle Gibbs) and SMC^2.

  • Basic support for parallel computation (i.e. running multiple SMC algorithms on different CPU cores).

  • Variance estimators (Chan and Lai, 2013 ; Lee and Whiteley, 2018; Olsson and Douc, 2019)

  • nested sampling (basic, experimental).

Example

Here is how you may define a parametric state-space model:

import particles
import particles.state_space_models as ssm
import particles.distributions as dists

class ToySSM(ssm.StateSpaceModel):
    def PX0(self):  # Distribution of X_0 
        return dists.Normal()  # X_0 ~ N(0, 1)
    def PX(self, t, xp):  # Distribution of X_t given X_{t-1}
        return dists.Normal(loc=xp)  # X_t ~ N( X_{t-1}, 1)
    def PY(self, t, xp, x):  # Distribution of Y_t given X_t (and X_{t-1}) 
        return dists.Normal(loc=x, scale=self.sigma)  # Y_t ~ N(X_t, sigma^2)

You may now choose a particular model within this class, and simulate data from it:

my_model = ToySSM(sigma=0.2)
x, y = my_model.simulate(200)  # sample size is 200

To run a bootstrap particle filter for this model and data y, simply do:

alg = particles.SMC(fk=ssm.Bootstrap(ssm=my_model, data=y), N=200)
alg.run()

That's it! Head to the documentation for more examples, explanations, and installation instructions.

Who do I talk to?

Nicolas Chopin ([email protected]) is the main author, contributor, and person to blame if things do not work as expected.

Bug reports, feature requests, questions, rants, etc are welcome, preferably on the github page.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].