All Projects → lindermanlab → Ssm

lindermanlab / Ssm

Licence: mit
Bayesian learning and inference for state space models

Projects that are alternatives of or similar to Ssm

Machinelearninginaction3x
Source Code for Machine Learning in Action for Python 3.X
Stars: ✭ 253 (-0.78%)
Mutual labels:  jupyter-notebook
Keras Bert
A simple technique to integrate BERT from tf hub to keras
Stars: ✭ 255 (+0%)
Mutual labels:  jupyter-notebook
Amazing Python Scripts
🚀 Curated collection of Amazing Python scripts from Basics to Advance with automation task scripts.
Stars: ✭ 229 (-10.2%)
Mutual labels:  jupyter-notebook
Visual genome python driver
A python wrapper for the Visual Genome API
Stars: ✭ 253 (-0.78%)
Mutual labels:  jupyter-notebook
Pytudes
Python programs, usually short, of considerable difficulty, to perfect particular skills.
Stars: ✭ 17,219 (+6652.55%)
Mutual labels:  jupyter-notebook
Deep Learning From Scratch
Six snippets of code that made deep learning what it is today.
Stars: ✭ 255 (+0%)
Mutual labels:  jupyter-notebook
Speech recognition with tensorflow
Implementation of a seq2seq model for Speech Recognition using the latest version of TensorFlow. Architecture similar to Listen, Attend and Spell.
Stars: ✭ 253 (-0.78%)
Mutual labels:  jupyter-notebook
Dl Imperial Maths
Code and assignment repository for the Imperial College Mathematics department Deep Learning course
Stars: ✭ 256 (+0.39%)
Mutual labels:  jupyter-notebook
Football Crunching
Analysis and datasets about football (soccer)
Stars: ✭ 252 (-1.18%)
Mutual labels:  jupyter-notebook
Sipmask
SipMask: Spatial Information Preservation for Fast Image and Video Instance Segmentation (ECCV2020)
Stars: ✭ 255 (+0%)
Mutual labels:  jupyter-notebook
Practicalsessions2020
Repository for tutorial sessions at EEML2020
Stars: ✭ 252 (-1.18%)
Mutual labels:  jupyter-notebook
Complete Python 3 Bootcamp
Course Files for Complete Python 3 Bootcamp Course on Udemy
Stars: ✭ 18,322 (+7085.1%)
Mutual labels:  jupyter-notebook
Spacy Notebooks
💫 Jupyter notebooks for spaCy examples and tutorials
Stars: ✭ 255 (+0%)
Mutual labels:  jupyter-notebook
Cornell Conversational Analysis Toolkit
Stars: ✭ 250 (-1.96%)
Mutual labels:  jupyter-notebook
Causality
Stars: ✭ 252 (-1.18%)
Mutual labels:  jupyter-notebook
Cardiac Segmentation
Right Ventricle Cardiac MRI Segmentation
Stars: ✭ 253 (-0.78%)
Mutual labels:  jupyter-notebook
Learning To Reweight Examples
PyTorch Implementation of the paper Learning to Reweight Examples for Robust Deep Learning
Stars: ✭ 255 (+0%)
Mutual labels:  jupyter-notebook
Swa gaussian
Code repo for "A Simple Baseline for Bayesian Uncertainty in Deep Learning"
Stars: ✭ 252 (-1.18%)
Mutual labels:  jupyter-notebook
2018 Daguan Competition
2018年"达观杯"文本智能处理挑战赛-长文本分类-rank4
Stars: ✭ 256 (+0.39%)
Mutual labels:  jupyter-notebook
Stock Analysis
Regression, Scrapers, and Visualization
Stars: ✭ 255 (+0%)
Mutual labels:  jupyter-notebook

SSM: Bayesian learning and inference for state space models

Test status

This package has fast and flexible code for simulating, learning, and performing inference in a variety of state space models. Currently, it supports:

  • Hidden Markov Models (HMM)
  • Auto-regressive HMMs (ARHMM)
  • Input-output HMMs (IOHMM)
  • Hidden Semi-Markov Models (HSMM)
  • Linear Dynamical Systems (LDS)
  • Switching Linear Dynamical Systems (SLDS)
  • Recurrent SLDS (rSLDS)
  • Hierarchical extensions of the above
  • Partial observations and missing data

We support the following observation models:

  • Gaussian
  • Student's t
  • Bernoulli
  • Poisson
  • Categorical
  • Von Mises

HMM inference is done with either expectation maximization (EM) or stochastic gradient descent (SGD). For SLDS, we use stochastic variational inference (SVI).

Examples

Here's a snippet to illustrate how we simulate from an HMM.

import ssm
T = 100  # number of time bins
K = 5    # number of discrete states
D = 2    # dimension of the observations

# make an hmm and sample from it
hmm = ssm.HMM(K, D, observations="gaussian")
z, y = hmm.sample(T)

Fitting an HMM is simple.

test_hmm = ssm.HMM(K, D, observations="gaussian")
test_hmm.fit(y)
zhat = test_hmm.most_likely_states(y)

The notebooks folder has more thorough, complete examples of HMMs, SLDS, and recurrent SLDS.

Installation

git clone [email protected]:slinderman/ssm.git
cd ssm
pip install numpy cython
pip install -e .

This will install "from source" and compile the Cython code for fast message passing and gradients.

To install with some parallel support via OpenMP, first make sure that your compiler supports it. OS X's default Clang compiler does not, but you can install GNU gcc and g++ with conda. Once you've set these as your default, you can install with OpenMP support using

USE_OPENMP=True pip install -e .
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].