Jax-moseq

Latest version: v0.3.0

Safety actively analyzes 682229 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 1 of 2

0.3.0

Bug fixes and refactored installation for compatibility with CUDA12 and unpinned jax version. Use one of the following

pip install jax-moseq[cuda11]
pip install jax-moseq[cuda12]
pip install jax-moseq cpu


What's Changed
* bugfix for nlags=1 by calebweinreb in https://github.com/dattalab/jax-moseq/pull/36


**Full Changelog**: https://github.com/dattalab/jax-moseq/compare/0.2.2...0.3.0

0.2.2

What's Changed
* Update debugging.py by bainro in https://github.com/dattalab/jax-moseq/pull/34
* Add error message for too large latent dim by calebweinreb in https://github.com/dattalab/jax-moseq/pull/35

New Contributors
* bainro made their first contribution in https://github.com/dattalab/jax-moseq/pull/34

**Full Changelog**: https://github.com/dattalab/jax-moseq/compare/0.2.0...0.2.2

0.2.1

Bugfix to location aware modeling with 3D data

0.2.0

New location-aware models

In the `keypoint_slds` model, the animal's location $v_t$ and heading $h_t$ at each timepoint are conditionally independent of the current syllable $z_t$. In particular, we assume

math
\begin{align}
v_{t+1} & \sim \mathcal{N}(v_t, \sigma^2_\text{loc} I_2) \\
h_{t+1} & \sim \text{Uniform}(-\pi, \pi)
\end{align}


This release introduces two new models (`allo_dynamics` and `allo_keypoint_slds`) that relax this assumption by allowing the location and heading to depend on the current syllable. Specifically, each syllable is associated with a pair of normal distributions that specify the animal's expected rotation and translation at each timestep. This can be expressed formally as follows:

math
\begin{align}
h_{t+1} = h_t + \Delta h_{z_t} + \epsilon_h,
& \ \text{ where } \
\epsilon_h \mid z_t \sim \mathcal{N}(0, \sigma^2_{h,z_t}) \\
v_{t+1} = v_t + R(h_t)^\top \Delta v_{z_t} + \epsilon_v,
& \ \text{ where } \
\epsilon_v \mid z_t \sim \mathcal{N}(0, \sigma^2_{v, z_t} I_2)
\end{align}


where $R(h)$ is a rotation matrix that rotates a vector by angle $h$. The parameters $\Delta h_i$, $\Delta v_i$, $\sigma^2_{h,i}$, and $\sigma^2_{v,i}$ for each syllable $i$ have a normal-inverse-gamma prior:

math
\begin{align}
\sigma^2_{v,i} & \sim \text{InverseGamma}(\alpha_v, \beta_v), \ \ \ \ \Delta v_i \sim \mathcal{N}(0, \sigma^2_{v,i} I_2 / \lambda_v) \\
\sigma^2_{h,i} & \sim \text{InverseGamma}(\alpha_h, \beta_h), \ \ \ \ \Delta h_i \sim \mathcal{N}(0, \sigma^2_{h,i} / \lambda_h)
\end{align}


In the `allo_dynamics` model, centroid and heading are provided as data (without any keypoints) and syllables are defined completely by their rotation and translation dynamics. In the `allo_keypoint_slds` model, keypoints are provided as data, centroid and heading are inferred as latent variables, and the syllables are defined by a combination of rotation, translation and autoregressive pose dynamics.

The `allo_keypoint_slds` model is available through the keypoint-MoSeq API (see [docs](https://keypoint-moseq.readthedocs.io/en/latest/advanced.html#location-aware-modeling))


Minor changes

- New functions were added to support expected marginal likelihood score calculation (see [keypoint-MoSeq docs](https://keypoint-moseq.readthedocs.io/en/latest/advanced.html#model-selection-and-comparison)) and estimation of syllable marginal probabilities.

- The `center_embedding` matrix that maps (k-1)-vectors to centered k-vectors is now constructed deterministically rather than through SVD. This makes it more reliable across numpy versions and operating systems. However, models built using previous versions of jax_moseq will no longer be compatible (e.g. when applying models or resuming model fitting).

0.1.0

Finalizes incorporation of dynamax (pass params as functions, pass noise as diagonal)

0.0.5

What's Changed
* Parallel inference with dynamax and mixed_map util by calebweinreb in https://github.com/dattalab/jax-moseq/pull/28


**Full Changelog**: https://github.com/dattalab/jax-moseq/compare/0.0.4...0.0.5

Page 1 of 2

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.