Skip to content

Commit 0adf91b

Browse files
committed
feat: add non-linear and non-gaussian models
1 parent 3231c32 commit 0adf91b

11 files changed

Lines changed: 1226 additions & 2 deletions

File tree

docs/api/index.rst

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,17 @@ Complete reference for all public classes and functions in dynaris.
66
+------------------+-------------------------------------------------------------+
77
| Module | Description |
88
+==================+=============================================================+
9+
| :doc:`ssm` | Unified ``SSM`` class with automatic filter selection |
10+
+------------------+-------------------------------------------------------------+
911
| :doc:`dlm` | High-level ``DLM`` class (fit, smooth, forecast, plot) |
1012
+------------------+-------------------------------------------------------------+
1113
| :doc:`components` | Six composable building blocks (``LocalLevel``, etc.) |
1214
+------------------+-------------------------------------------------------------+
15+
| :doc:`models` | Built-in nonlinear models (stochastic vol, tracking, etc.) |
16+
+------------------+-------------------------------------------------------------+
1317
| :doc:`core` | ``StateSpaceModel``, ``GaussianState``, result containers |
1418
+------------------+-------------------------------------------------------------+
15-
| :doc:`filters` | Kalman filter (predict, update, full forward pass) |
19+
| :doc:`filters` | Kalman, EKF, UKF, and Particle filters |
1620
+------------------+-------------------------------------------------------------+
1721
| :doc:`smoothers` | Rauch-Tung-Striebel backward smoother |
1822
+------------------+-------------------------------------------------------------+
@@ -29,8 +33,10 @@ Complete reference for all public classes and functions in dynaris.
2933
:maxdepth: 2
3034
:hidden:
3135

36+
ssm
3237
dlm
3338
components
39+
models
3440
core
3541
filters
3642
smoothers

docs/api/models.rst

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
Built-in Nonlinear Models
2+
=========================
3+
4+
Factory functions that return :class:`~dynaris.core.nonlinear.NonlinearSSM`
5+
instances for well-known nonlinear state-space models.
6+
7+
Stochastic Volatility
8+
---------------------
9+
10+
.. autofunction:: dynaris.models.StochasticVolatility
11+
12+
.. autofunction:: dynaris.models.transform_returns
13+
14+
Bearings-Only Tracking
15+
----------------------
16+
17+
.. autofunction:: dynaris.models.BearingsTracking
18+
19+
Lorenz Attractor
20+
----------------
21+
22+
.. autofunction:: dynaris.models.LorenzAttractor

docs/api/ssm.rst

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
SSM (Unified Interface)
2+
=======================
3+
4+
A unified high-level interface for both linear and nonlinear state-space
5+
models, with automatic filter selection.
6+
7+
.. autoclass:: dynaris.core.ssm.SSM
8+
:members:
9+
:show-inheritance:

src/dynaris/__init__.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
"""dynaris: A JAX-powered Python library for Dynamic Linear Models (DLMs)."""
22

33
from dynaris.core import (
4+
SSM,
45
FilterProtocol,
56
FilterResult,
67
GaussianState,
@@ -28,13 +29,21 @@
2829
particle_filter,
2930
ukf_filter,
3031
)
32+
from dynaris.models import (
33+
BearingsTracking,
34+
LorenzAttractor,
35+
StochasticVolatility,
36+
transform_returns,
37+
)
3138
from dynaris.smoothers import RTSSmoother, rts_smooth
3239

3340
__version__ = "0.1.0"
3441

3542
__all__ = [
3643
"DLM",
44+
"SSM",
3745
"Autoregressive",
46+
"BearingsTracking",
3847
"Cycle",
3948
"ExtendedKalmanFilter",
4049
"FilterProtocol",
@@ -43,6 +52,7 @@
4352
"KalmanFilter",
4453
"LocalLevel",
4554
"LocalLinearTrend",
55+
"LorenzAttractor",
4656
"NonlinearSSM",
4757
"ParticleFilter",
4858
"RTSSmoother",
@@ -51,11 +61,13 @@
5161
"SmootherProtocol",
5262
"SmootherResult",
5363
"StateSpaceModel",
64+
"StochasticVolatility",
5465
"UnscentedKalmanFilter",
5566
"__version__",
5667
"ekf_filter",
5768
"kalman_filter",
5869
"particle_filter",
5970
"rts_smooth",
71+
"transform_returns",
6072
"ukf_filter",
6173
]

src/dynaris/core/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,12 @@
33
from dynaris.core.nonlinear import NonlinearSSM
44
from dynaris.core.protocols import FilterProtocol, SmootherProtocol
55
from dynaris.core.results import FilterResult, SmootherResult
6+
from dynaris.core.ssm import SSM
67
from dynaris.core.state_space import StateSpaceModel
78
from dynaris.core.types import GaussianState
89

910
__all__ = [
11+
"SSM",
1012
"FilterProtocol",
1113
"FilterResult",
1214
"GaussianState",

0 commit comments

Comments
 (0)