smolgp 0.0.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- smolgp-0.0.1/.gitignore +16 -0
- smolgp-0.0.1/LICENSE +21 -0
- smolgp-0.0.1/PKG-INFO +40 -0
- smolgp-0.0.1/README.md +18 -0
- smolgp-0.0.1/pyproject.toml +57 -0
- smolgp-0.0.1/src/smolgp/__init__.py +23 -0
- smolgp-0.0.1/src/smolgp/gp.py +777 -0
- smolgp-0.0.1/src/smolgp/helpers.py +54 -0
- smolgp-0.0.1/src/smolgp/kernels/__init__.py +64 -0
- smolgp-0.0.1/src/smolgp/kernels/base.py +1202 -0
- smolgp-0.0.1/src/smolgp/kernels/integrated.py +373 -0
- smolgp-0.0.1/src/smolgp/solvers/__init__.py +42 -0
- smolgp-0.0.1/src/smolgp/solvers/integrated/__init__.py +16 -0
- smolgp-0.0.1/src/smolgp/solvers/integrated/kalman.py +129 -0
- smolgp-0.0.1/src/smolgp/solvers/integrated/parallel/kalman.py +401 -0
- smolgp-0.0.1/src/smolgp/solvers/integrated/parallel/rts.py +168 -0
- smolgp-0.0.1/src/smolgp/solvers/integrated/parallel/solver.py +313 -0
- smolgp-0.0.1/src/smolgp/solvers/integrated/rts.py +111 -0
- smolgp-0.0.1/src/smolgp/solvers/integrated/solver.py +280 -0
- smolgp-0.0.1/src/smolgp/solvers/kalman.py +113 -0
- smolgp-0.0.1/src/smolgp/solvers/parallel/kalman.py +258 -0
- smolgp-0.0.1/src/smolgp/solvers/parallel/rts.py +106 -0
- smolgp-0.0.1/src/smolgp/solvers/parallel/solver.py +251 -0
- smolgp-0.0.1/src/smolgp/solvers/rts.py +86 -0
- smolgp-0.0.1/src/smolgp/solvers/solver.py +242 -0
- smolgp-0.0.1/tests/__init__.py +0 -0
- smolgp-0.0.1/tests/benchmark/__init__.py +0 -0
- smolgp-0.0.1/tests/benchmark/benchmark.py +491 -0
- smolgp-0.0.1/tests/benchmark/figures/cond_benchmark.png +0 -0
- smolgp-0.0.1/tests/benchmark/figures/cond_int_benchmark.png +0 -0
- smolgp-0.0.1/tests/benchmark/figures/llh_benchmark.png +0 -0
- smolgp-0.0.1/tests/benchmark/figures/llh_int_benchmark.png +0 -0
- smolgp-0.0.1/tests/benchmark/figures/pred_benchmark.png +0 -0
- smolgp-0.0.1/tests/benchmark/figures/pred_int_benchmark.png +0 -0
- smolgp-0.0.1/tests/benchmark/funcs.py +136 -0
- smolgp-0.0.1/tests/benchmark/kernels.py +651 -0
- smolgp-0.0.1/tests/benchmark/plotting.py +84 -0
- smolgp-0.0.1/tests/benchmark/results/llh_benchmark.pkl +0 -0
- smolgp-0.0.1/tests/benchmark/run_benchmark.py +132 -0
- smolgp-0.0.1/tests/benchmark/testing-benchmark.ipynb +631 -0
- smolgp-0.0.1/tests/integrated-proof.ipynb +2589 -0
- smolgp-0.0.1/tests/testing-integrated.ipynb +2111 -0
- smolgp-0.0.1/tests/testing-kernels.ipynb +594 -0
- smolgp-0.0.1/tests/testing-multicomponent.ipynb +1213 -0
smolgp-0.0.1/.gitignore
ADDED
smolgp-0.0.1/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 Ryan Rubenzahl
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
smolgp-0.0.1/PKG-INFO
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: smolgp
|
|
3
|
+
Version: 0.0.1
|
|
4
|
+
Summary: Gaussian Process State Space Models in Python/JAX
|
|
5
|
+
Project-URL: Homepage, https://github.com/smolgp-dev/smolgp
|
|
6
|
+
Project-URL: Issues, https://github.com/smolgp-dev/smolgp/issues
|
|
7
|
+
Author-email: Ryan Rubenzahl <rrubenzahl@gmail.com>, Soichiro Hattori <soichiro.hattori@gmail.com>
|
|
8
|
+
License: MIT
|
|
9
|
+
License-File: LICENSE
|
|
10
|
+
Classifier: Development Status :: 4 - Beta
|
|
11
|
+
Classifier: Intended Audience :: Developers
|
|
12
|
+
Classifier: Intended Audience :: Science/Research
|
|
13
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
14
|
+
Classifier: Operating System :: OS Independent
|
|
15
|
+
Classifier: Programming Language :: Python
|
|
16
|
+
Classifier: Programming Language :: Python :: 3
|
|
17
|
+
Requires-Python: >=3.10
|
|
18
|
+
Requires-Dist: equinox>=0.13.1
|
|
19
|
+
Requires-Dist: jax>=0.6.2
|
|
20
|
+
Requires-Dist: tinygp>=0.3.0
|
|
21
|
+
Description-Content-Type: text/markdown
|
|
22
|
+
|
|
23
|
+
<p align="center">
|
|
24
|
+
<img width="100" height="100" alt="smolgp-logo" src="https://github.com/user-attachments/assets/66c691c9-c4d3-4253-9587-82f50adda047"/><br>
|
|
25
|
+
<strong>smolgp</strong><br>
|
|
26
|
+
<i>State Space Models for O(Linear/Log) Gaussian Processes</i>
|
|
27
|
+
</p>
|
|
28
|
+
|
|
29
|
+
`smolgp` is a Python/JAX extension of the [`tinygp`](https://github.com/dfm/tinygp) package that implements
|
|
30
|
+
1. A Kalman filter and RTS smoother as a `StateSpaceSolver` compatible with `tinygp`-like GP kernels.
|
|
31
|
+
2. An `IntegratedStateSpaceSolver` that can handle integrated (and possibly overlapping) measurements from mutliple instruments (see Rubenzahl and Hattori et al. in prep)
|
|
32
|
+
3. Parallelized versions of 1 (see [Särkkä and García-Fernández 2020](https://ieeexplore.ieee.org/document/9013038)) and 2 (see [Yaghoobi and Särkkä 2024](https://ieeexplore.ieee.org/abstract/document/10804629) and its [implementation](https://github.com/Fatemeh-Yaghoobi/Parallel-integrated-method?tab=readme-ov-file)) using `jax.lax.associative_scan`
|
|
33
|
+
|
|
34
|
+
TODO:
|
|
35
|
+
- benchmark plots from paper/showing full GP vs. QSM GP vs. SSM vs. parallel SSM
|
|
36
|
+
- doc/example useage
|
|
37
|
+
- tests
|
|
38
|
+
|
|
39
|
+
Possible additions
|
|
40
|
+
- define other kernels not in tinygp
|
smolgp-0.0.1/README.md
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
<p align="center">
|
|
2
|
+
<img width="100" height="100" alt="smolgp-logo" src="https://github.com/user-attachments/assets/66c691c9-c4d3-4253-9587-82f50adda047"/><br>
|
|
3
|
+
<strong>smolgp</strong><br>
|
|
4
|
+
<i>State Space Models for O(Linear/Log) Gaussian Processes</i>
|
|
5
|
+
</p>
|
|
6
|
+
|
|
7
|
+
`smolgp` is a Python/JAX extension of the [`tinygp`](https://github.com/dfm/tinygp) package that implements
|
|
8
|
+
1. A Kalman filter and RTS smoother as a `StateSpaceSolver` compatible with `tinygp`-like GP kernels.
|
|
9
|
+
2. An `IntegratedStateSpaceSolver` that can handle integrated (and possibly overlapping) measurements from mutliple instruments (see Rubenzahl and Hattori et al. in prep)
|
|
10
|
+
3. Parallelized versions of 1 (see [Särkkä and García-Fernández 2020](https://ieeexplore.ieee.org/document/9013038)) and 2 (see [Yaghoobi and Särkkä 2024](https://ieeexplore.ieee.org/abstract/document/10804629) and its [implementation](https://github.com/Fatemeh-Yaghoobi/Parallel-integrated-method?tab=readme-ov-file)) using `jax.lax.associative_scan`
|
|
11
|
+
|
|
12
|
+
TODO:
|
|
13
|
+
- benchmark plots from paper/showing full GP vs. QSM GP vs. SSM vs. parallel SSM
|
|
14
|
+
- doc/example useage
|
|
15
|
+
- tests
|
|
16
|
+
|
|
17
|
+
Possible additions
|
|
18
|
+
- define other kernels not in tinygp
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
[project]
|
|
2
|
+
name = "smolgp"
|
|
3
|
+
version = "0.0.1"
|
|
4
|
+
description = "Gaussian Process State Space Models in Python/JAX"
|
|
5
|
+
authors = [{ name = "Ryan Rubenzahl", email = "rrubenzahl@gmail.com" },
|
|
6
|
+
{ name = "Soichiro Hattori", email = "soichiro.hattori@gmail.com"}]
|
|
7
|
+
readme = "README.md"
|
|
8
|
+
requires-python = ">=3.10"
|
|
9
|
+
license = { text = "MIT" }
|
|
10
|
+
classifiers = [
|
|
11
|
+
"Development Status :: 4 - Beta",
|
|
12
|
+
"Intended Audience :: Developers",
|
|
13
|
+
"Intended Audience :: Science/Research",
|
|
14
|
+
"License :: OSI Approved :: MIT License",
|
|
15
|
+
"Operating System :: OS Independent",
|
|
16
|
+
"Programming Language :: Python",
|
|
17
|
+
"Programming Language :: Python :: 3",
|
|
18
|
+
]
|
|
19
|
+
dependencies = [
|
|
20
|
+
"equinox>=0.13.1",
|
|
21
|
+
"jax>=0.6.2",
|
|
22
|
+
"tinygp>=0.3.0",
|
|
23
|
+
]
|
|
24
|
+
|
|
25
|
+
[dependency-groups]
|
|
26
|
+
dev = [
|
|
27
|
+
"astropy>=6.1.7",
|
|
28
|
+
"jupyter>=1.1.1",
|
|
29
|
+
"matplotlib>=3.10.6",
|
|
30
|
+
]
|
|
31
|
+
cuda12 = ["jax[cuda12]"]
|
|
32
|
+
cuda13 = ["jax[cuda13]"]
|
|
33
|
+
|
|
34
|
+
[tool.uv]
|
|
35
|
+
conflicts = [
|
|
36
|
+
[
|
|
37
|
+
{group = "cuda12"},
|
|
38
|
+
{group = "cuda13"}
|
|
39
|
+
]
|
|
40
|
+
]
|
|
41
|
+
|
|
42
|
+
[project.urls]
|
|
43
|
+
Homepage = "https://github.com/smolgp-dev/smolgp"
|
|
44
|
+
Issues = "https://github.com/smolgp-dev/smolgp/issues"
|
|
45
|
+
|
|
46
|
+
[build-system]
|
|
47
|
+
requires = ["hatchling >= 1.26"]
|
|
48
|
+
build-backend = "hatchling.build"
|
|
49
|
+
|
|
50
|
+
[tool.uv.sources]
|
|
51
|
+
tinygp = { git = "https://github.com/dfm/tinygp" }
|
|
52
|
+
|
|
53
|
+
[tool.ruff]
|
|
54
|
+
ignore = ["E731", # lambda functions
|
|
55
|
+
"E741", # ambiguous variable names (e.g. I)
|
|
56
|
+
"E743", # ambiguous function names (e.g. I)
|
|
57
|
+
]
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"""
|
|
2
|
+
``smolgp`` is designed to be a drop-in extension of the `tinygp <https://github.com/dfm/tinygp>`_
|
|
3
|
+
library for building Gaussian Process (GP) models in Python. It is also built
|
|
4
|
+
on top of `jax <https://github.com/google/jax>`_. ``smolgp`` uses state space
|
|
5
|
+
representations of Gaussian Processes to implement linear-time (or up to logN with
|
|
6
|
+
parallelization on GPU) solvers for GP regression and forecasting. It also implements
|
|
7
|
+
"integrated" kernels that can model time-averaged measurements, such as those from
|
|
8
|
+
long-exposure astronomical observations, which can also be solved in linear time and is
|
|
9
|
+
compatible with the parallel methods.
|
|
10
|
+
|
|
11
|
+
The primary way that you will use to interact with ``smolgp`` is by constructing
|
|
12
|
+
"kernel" functions using the building blocks provided in the ``kernels``
|
|
13
|
+
subpackage (see :ref:`api-kernels`), and then passing that to a
|
|
14
|
+
:class:`GaussianProcess` object to do all the computations. Check out the
|
|
15
|
+
:ref:`tutorials` for a more complete introduction.
|
|
16
|
+
"""
|
|
17
|
+
|
|
18
|
+
from smolgp import (
|
|
19
|
+
kernels as kernels,
|
|
20
|
+
solvers as solvers,
|
|
21
|
+
)
|
|
22
|
+
from smolgp.gp import GaussianProcess as GaussianProcess
|
|
23
|
+
# from smolgp.smolgp_version import __version__ as __version__
|