https://github.com/probml/jsl
Jax SSM Library
https://github.com/probml/jsl
Last synced: about 1 year ago
JSON representation
Jax SSM Library
- Host: GitHub
- URL: https://github.com/probml/jsl
- Owner: probml
- License: mit
- Archived: true
- Created: 2021-12-02T07:45:15.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2022-11-24T14:50:45.000Z (over 3 years ago)
- Last Synced: 2025-03-21T21:44:29.265Z (over 1 year ago)
- Language: Python
- Size: 6.61 MB
- Stars: 49
- Watchers: 8
- Forks: 12
- Open Issues: 10
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Citation: CITATION.cff
Awesome Lists containing this project
README
# JSL: JAX State-Space models (SSM) Library
JSL is a JAX library for Bayesian inference in state space models.
As of 2022-06-28, JSL is **deprecated**. You should use [ssm-jax](https://github.com/probml/ssm-jax).
# Installation
We assume you have already installed [JAX](https://github.com/google/jax#installation) and
[Tensorflow](https://www.tensorflow.org/install),
since the details on how to do this depend on whether you have a CPU, GPU, etc.
(This step is not necessary in Colab.)
Now install these packages:
```
!pip install --upgrade git+https://github.com/google/flax.git
!pip install --upgrade tensorflow-probability
!pip install git+https://github.com/blackjax-devs/blackjax.git
!pip install git+https://github.com/deepmind/distrax.git
```
Then install JSL:
```
!pip install git+https://github.com/probml/jsl
```
Alternatively, you can clone the repo locally, into say `~/github/JSL`, and then install it as a package, as follows:
```
!git clone https://github.com/probml/JSL.git
cd JSL
!pip install -e .
```
# Running the demos
You can see how to use the library by looking at some of the demos.
You can run the demos from inside a notebook like this
```
%run JSL/jsl/demos/kf_tracking.py
%run JSL/jsl/demos/hmm_casino_em_train.py
```
Or from inside an ipython shell like this
```
from jsl.demos import kf_tracking
figdict = kf_tracking.main()
```
Most of the demos create figures. If you want to save them (in both png and pdf format),
you need to specify the FIGDIR environment variable, like this:
```
import os
os.environ["FIGDIR"]='/Users/kpmurphy/figures'
from jsl.demos.plot_utils import savefig
savefig(figdict)
```
# Authors
Gerardo Durán-Martín ([@gerdm](https://github.com/gerdm)), Aleyna Kara([@karalleyna](https://github.com/karalleyna)), Kevin Murphy ([@murphyk](https://github.com/murphyk)), Giles Harper-Donnelly ([@gileshd](https://github.com/gileshd)), Peter Chang ([@petergchang](https://github.com/petergchang)).