hsgp 0.0.1__py3-none-any.whl
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.
- hsgp/__init__.py +0 -0
- hsgp/py.typed +0 -0
- hsgp-0.0.1.dist-info/METADATA +34 -0
- hsgp-0.0.1.dist-info/RECORD +5 -0
- hsgp-0.0.1.dist-info/WHEEL +4 -0
hsgp/__init__.py
ADDED
|
File without changes
|
hsgp/py.typed
ADDED
|
File without changes
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: hsgp
|
|
3
|
+
Version: 0.0.1
|
|
4
|
+
Summary: Hilbert-Space Gaussian processes in JAX: a 1-D GP prior with an N(0, I) parametrization, exact linear-functional constraints and analytic derivatives
|
|
5
|
+
Author: Rodrigo Calderon
|
|
6
|
+
Author-email: Rodrigo Calderon <calderon.cosmology@gmail.com>
|
|
7
|
+
License-Expression: MIT
|
|
8
|
+
Requires-Dist: equinox>=0.11
|
|
9
|
+
Requires-Dist: jax>=0.4.30
|
|
10
|
+
Requires-Dist: jaxtyping>=0.2.34
|
|
11
|
+
Requires-Python: >=3.12
|
|
12
|
+
Description-Content-Type: text/markdown
|
|
13
|
+
|
|
14
|
+
# hsgp
|
|
15
|
+
|
|
16
|
+
Hilbert-space Gaussian processes [Solin & Särkkä 2020](https://arxiv.org/abs/1401.5508) in JAX. A GP prior is written on a fixed sine basis,
|
|
17
|
+
|
|
18
|
+
$$g(t) = \sum_{j=1}^{m} \sqrt{S(\omega_j)}\,\phi_j(t)\,(P z)_j, \qquad z \sim \mathcal{N}(0, I_m),$$
|
|
19
|
+
|
|
20
|
+
where
|
|
21
|
+
- $m$ is the number of basis functions (modes);
|
|
22
|
+
- $\phi_j(t) = \sqrt{2/D}\,\sin\big(\omega_j (t - L_0)\big)$ are the sine functions that vanish at both ends of the box (the Laplacian eigenfunctions with Dirichlet boundary conditions), with frequencies $\omega_j = j\pi/D$;
|
|
23
|
+
- $S(\omega)$ is the spectral density (the Fourier transform) of the stationary kernel $k(t - t')$, which has length scale $\ell$ and amplitude $\sigma$;
|
|
24
|
+
- $z$ is the vector of $m$ parameters, independent standard normals, and $I_m$ is the $m \times m$ identity;
|
|
25
|
+
- $P$ is the $m \times m$ orthogonal projector that enforces the linear constraints exactly. It is $I_m$ when there are no constraints.
|
|
26
|
+
|
|
27
|
+
This construction means that:
|
|
28
|
+
|
|
29
|
+
- **the parameters have a trivial density.** You can sample a GP prior with NUTS, put it in a likelihood, or use it in simulation-based inference.
|
|
30
|
+
- **derivatives and integrals of a draw are analytic.** The derivatives come from the same expansion as the function itself, so they are consistent with it by construction.
|
|
31
|
+
- **linear constraints hold exactly.** You can pin values, derivatives of any order the kernel allows, and integrals. The projector $P$ is applied in weight space, which is exact Gaussian conditioning, not a boundary trick.
|
|
32
|
+
- **hyperparameters can be traced.** $\ell$ and $\sigma$ enter only through $\sqrt{S}$ and $P$, so they can be sampled while the basis stays fixed.
|
|
33
|
+
|
|
34
|
+
The available kernels are `SquaredExponential` and `Matern(nu=1.5 | 2.5)`. Each kernel provides its spectral density, its closed-form covariance and derivatives (useful as references), and guidance for the padding and the number of modes.
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
hsgp/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
2
|
+
hsgp/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
3
|
+
hsgp-0.0.1.dist-info/WHEEL,sha256=G_-rrEibZr7OEM7zdH1dSO6s-VdjfnS5PA4CLAdI9Vw,80
|
|
4
|
+
hsgp-0.0.1.dist-info/METADATA,sha256=xSwAxhNxLFbEa36n1YJ8xjaqpEMk0RIhdTVVZ2-ci8s,2368
|
|
5
|
+
hsgp-0.0.1.dist-info/RECORD,,
|