Science Score: 44.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
✓CITATION.cff file
Found CITATION.cff file -
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
○DOI references
-
○Academic publication links
-
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (12.9%) to scientific vocabulary
Repository
Bayesian learning and inference for state space models
Basic Info
Statistics
- Stars: 633
- Watchers: 36
- Forks: 212
- Open Issues: 31
- Releases: 0
Metadata Files
README.md
SSM: Bayesian learning and inference for state space models
Note: We're working full time on a JAX refactor of SSM that will take advantage of JIT compilation, GPU and TPU support, automatic differentation, etc. You can keep track of our progress here. We're hoping to make an official release soon!
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 https://github.com/lindermanlab/ssm
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 .
Owner
- Name: Linderman Lab
- Login: lindermanlab
- Kind: organization
- Location: https://web.stanford.edu/~swl1/
- Repositories: 8
- Profile: https://github.com/lindermanlab
Citation (CITATION.cff)
cff-version: 1.2.0 message: "You can cite this software as below." authors: - family-names: "Linderman" given-names: "Scott" orcid: "0000-0002-3878-9073" - family-names: "Antin" given-names: "Benjamin" - family-names: "Zoltowski" given-names: "David" - family-names: "Glaser" given-names: "Joshua" title: "SSM: Bayesian Learning and Inference for State Space Models" version: 0.0.1 date-released: 2020-10-15 url: "https://github.com/lindermanlab/ssm"
GitHub Events
Total
- Issues event: 5
- Watch event: 71
- Issue comment event: 4
- Push event: 1
- Pull request event: 2
- Fork event: 25
Last Year
- Issues event: 5
- Watch event: 71
- Issue comment event: 4
- Push event: 1
- Pull request event: 2
- Fork event: 25
Issues and Pull Requests
Last synced: 10 months ago
All Time
- Total issues: 73
- Total pull requests: 41
- Average time to close issues: 5 months
- Average time to close pull requests: 9 days
- Total issue authors: 50
- Total pull request authors: 17
- Average comments per issue: 1.71
- Average comments per pull request: 0.59
- Merged pull requests: 35
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 5
- Pull requests: 2
- Average time to close issues: N/A
- Average time to close pull requests: 6 days
- Issue authors: 5
- Pull request authors: 1
- Average comments per issue: 0.0
- Average comments per pull request: 1.0
- Merged pull requests: 2
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
- bantin (16)
- davidgwyrick (3)
- zhangyongheng78 (2)
- slinderman (2)
- davidzoltowski (2)
- shreyask3107 (2)
- sarathnayar (2)
- r-shruthi11 (2)
- Lucas97223 (1)
- charlesincharge (1)
- nightshade2303 (1)
- andrewczgithub (1)
- themattinthehatt (1)
- samdeoxys1 (1)
- bagibence (1)
Pull Request Authors
- bantin (17)
- slinderman (4)
- jglaser2 (3)
- Zeinab-Mohammadi (2)
- yahmadian (2)
- emdupre (2)
- zashwood (2)
- ghuckins (1)
- ahwillia (1)
- orrenkt (1)
- mmyros (1)
- bagibence (1)
- gaoyuanjun (1)
- guyhwilson (1)
- davidzoltowski (1)