Skip to content

Fixed MVN norm factor.#58

Merged
AlexanderFabisch merged 5 commits intoAlexanderFabisch:masterfrom
ARoefer:fix/mvn-density-factor
Aug 13, 2025
Merged

Fixed MVN norm factor.#58
AlexanderFabisch merged 5 commits intoAlexanderFabisch:masterfrom
ARoefer:fix/mvn-density-factor

Conversation

@ARoefer
Copy link
Contributor

@ARoefer ARoefer commented Aug 12, 2025

Addresses the problem described in #57

@ARoefer ARoefer mentioned this pull request Aug 12, 2025
@AlexanderFabisch
Copy link
Owner

AlexanderFabisch commented Aug 12, 2025

Didn't test it with the new version, but I think this should allow us to approximately test if $\int_{\mathbb{R}} p(x) dx = 1$.

mvn = gmr.MVN(mean=np.zeros(1), covariance=np.ones((1, 1)))
total_probability = np.sum(mvn.to_probability_density(np.linspace(-100, 100, 10001)[:, np.newaxis]) * 0.02)

@ARoefer
Copy link
Contributor Author

ARoefer commented Aug 13, 2025

I updated the test by introducing a 3D distribution. I also noticed that my previous norm calculation was wrong.

@AlexanderFabisch AlexanderFabisch merged commit a83f39e into AlexanderFabisch:master Aug 13, 2025
2 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants