A simple multi-dimensional Gaussian model from Lartillot et al '06, useful for testing Bayesian applications.
Project description
Lartillot Gaussian model
The multidimensional Gaussian model from Lartillot et al '06 is useful for testing Bayesian applications.
The model is parameterised by a vector $\theta = (\theta_1, \theta_2, \ldots, \theta_d)$ of dimension $d$. The prior on $\theta$ is a product of independent normals with a null mean and unit variance. The likelihood function is given by $$\mathcal{L}(\theta, v) = {(2\pi v)^{-d/2}} \prod_{i = 1}^d \text{exp}\bigg[\frac{-\theta_i^2}{2v}\bigg],$$ where $v$ is the common variance for all $d$ dimensions.
The joint posterior is given by $d$ products of $\mathcal{N}(0, v/(1+v))$. Finally, the evidence is given by $$ \mathcal{Z} = (2\pi v)^{-d/2} \left(\frac{v}{1 + v} \right)^{d/2}=\left(2\pi(1+v)\right)^{-d/2}\ . $$
This codebase provides a simple implementation of the Lartillot Gaussian model in Python.
pip install lartillot_gaussian
from lartillot_gaussian import LartillotGaussianModel
import numpy as np
model = LartillotGaussianModel(d=10, v=1.0)
theta = np.array([[0]])
print(model.lnz)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file lartillot_gaussian-0.0.2.tar.gz.
File metadata
- Download URL: lartillot_gaussian-0.0.2.tar.gz
- Upload date:
- Size: 6.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.0.1 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
702f4453760882240826a33ed5812852917ea7a05f473168a3d9323a62d283de
|
|
| MD5 |
6bcc233c2c151c67325abf18c3f7b338
|
|
| BLAKE2b-256 |
34f389426c5521a1364d6078b0f21f78a16830409aa8e85443e6d7c25521b106
|
Provenance
The following attestation bundles were made for lartillot_gaussian-0.0.2.tar.gz:
Publisher:
pypi.yml on avivajpeyi/lartillot_gaussian
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
lartillot_gaussian-0.0.2.tar.gz -
Subject digest:
702f4453760882240826a33ed5812852917ea7a05f473168a3d9323a62d283de - Sigstore transparency entry: 174881620
- Sigstore integration time:
-
Permalink:
avivajpeyi/lartillot_gaussian@cb368f7f3320b60c25b109da97c60065504f162c -
Branch / Tag:
refs/heads/main - Owner: https://github.com/avivajpeyi
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi.yml@cb368f7f3320b60c25b109da97c60065504f162c -
Trigger Event:
push
-
Statement type:
File details
Details for the file lartillot_gaussian-0.0.2-py3-none-any.whl.
File metadata
- Download URL: lartillot_gaussian-0.0.2-py3-none-any.whl
- Upload date:
- Size: 3.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.0.1 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
99d1b878e42fe935bd331de13879444c637ba6b819f1287fe0017615736c6caa
|
|
| MD5 |
0262cc55f361e119a16cf31be1ee2fac
|
|
| BLAKE2b-256 |
34ff0b27cac29423a813e6d8d082f608b4d4a0f444d021a012a2ce91cfbd48df
|
Provenance
The following attestation bundles were made for lartillot_gaussian-0.0.2-py3-none-any.whl:
Publisher:
pypi.yml on avivajpeyi/lartillot_gaussian
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
lartillot_gaussian-0.0.2-py3-none-any.whl -
Subject digest:
99d1b878e42fe935bd331de13879444c637ba6b819f1287fe0017615736c6caa - Sigstore transparency entry: 174881622
- Sigstore integration time:
-
Permalink:
avivajpeyi/lartillot_gaussian@cb368f7f3320b60c25b109da97c60065504f162c -
Branch / Tag:
refs/heads/main - Owner: https://github.com/avivajpeyi
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi.yml@cb368f7f3320b60c25b109da97c60065504f162c -
Trigger Event:
push
-
Statement type: