Skip to content

Commit

Permalink
Merge pull request #7 from Joshuaalbert/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
Joshuaalbert authored Nov 5, 2024
2 parents 585c403 + 5fb3a41 commit b5b3c08
Show file tree
Hide file tree
Showing 19 changed files with 1,470 additions and 780 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,13 @@ from essm_jax.essm import ExtendedStateSpaceModel
tfpd = tfp.distributions


def transition_fn(z, t, t_next):
def transition_fn(z, t, t_next, *args):
mean = z + jnp.sin(2 * jnp.pi * t / 10 * z)
cov = 0.1 * jnp.eye(np.size(z))
return tfpd.MultivariateNormalTriL(mean, jnp.linalg.cholesky(cov))


def observation_fn(z, t):
def observation_fn(z, t, *args):
mean = z
cov = t * 0.01 * jnp.eye(np.size(z))
return tfpd.MultivariateNormalTriL(mean, jnp.linalg.cholesky(cov))
Expand Down
241 changes: 180 additions & 61 deletions docs/examples/excitable_damped_harmonic_oscillator.ipynb

Large diffs are not rendered by default.

196 changes: 0 additions & 196 deletions docs/examples/online_filtering.ipynb

This file was deleted.

541 changes: 541 additions & 0 deletions docs/examples/ou_process.ipynb

Large diffs are not rendered by default.

175 changes: 0 additions & 175 deletions essm_jax/jvp_op.py

This file was deleted.

68 changes: 0 additions & 68 deletions essm_jax/sparse.py

This file was deleted.

31 changes: 0 additions & 31 deletions essm_jax/tests/test_sparse.py

This file was deleted.

34 changes: 30 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,32 @@
# pyproject.toml

[build-system]
requires = [
"setuptools>=42",
"wheel"
requires = ["setuptools>=61.0", "wheel"]
build-backend = "setuptools.build_meta"

[project]
name = "essm_jax"
version = "1.0.2"
description = "Extended State Space Modelling in JAX"
readme = "README.md"
requires-python = ">3.9"
license = { text = "Apache Software License" }
authors = [{ name = "Joshua G. Albert", email = "[email protected]" }]
keywords = ["kalman", "non-linear", "EKF", "modelling"]
classifiers = [
"Programming Language :: Python :: 3",
"License :: OSI Approved :: Apache Software License",
"Operating System :: OS Independent"
]
build-backend = "setuptools.build_meta"
urls = { "Homepage" = "https://github.com/joshuaalbert/essm_jax" }

[project.optional-dependencies]
# Define the extras here; they will be loaded dynamically from setup.py
examples = [] # Placeholders; extras will load from setup.py

[tool.setuptools]
include-package-data = true


[tool.setuptools.packages.find]
where = ["src"]
3 changes: 2 additions & 1 deletion requirements-examples.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
matplotlib
jupyter
jupyter
jaxns
41 changes: 11 additions & 30 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,36 +1,17 @@
#!/usr/bin/env python

from setuptools import find_packages
from setuptools import setup

install_requires = [
'jax',
'jaxlib',
'numpy<2',
'tensorflow_probability'
]

with open("README.md", "r") as fh:
long_description = fh.read()
def load_requirements(file_name):
with open(file_name, "r") as file:
return [line.strip() for line in file if line.strip() and not line.startswith("#")]

setup(name='essm_jax',
version='1.0.1',
description='Extended State Spapce Model in JAX',
long_description=long_description,
long_description_content_type="text/markdown",
url="https://github.com/joshuaalbert/essm_jax",
author='Joshua G. Albert',
author_email='[email protected]',
install_requires=install_requires,
tests_require=[
'pytest>=2.8',
],
package_dir={'': './'},
packages=find_packages('./'),
classifiers=[
"Programming Language :: Python :: 3",
"License :: OSI Approved :: Apache Software License",
"Operating System :: OS Independent",
],
python_requires='>3.9',
)

setup(
install_requires=load_requirements("requirements.txt"),
extras_require={
"examples": load_requirements("requirements-examples.txt"),
},
tests_require=load_requirements("requirements-tests.txt"),
)
File renamed without changes.
Loading

0 comments on commit b5b3c08

Please sign in to comment.