greta-dev / greta-dev/greta

bad variable constraints for pareto distribution

Open
#274 0 comments 0 reactions 0 assignees View on GitHub
distributions
Dominant language
C++
Stars
607
Forks
67
Avg merge
3d 8h
Merged PRs (30d)
1

Description

As flagged [here](https://github.com/greta-dev/greta/pull/273#issuecomment-476912169), the pareto distribution was previously incorrectly implemented as being constrained to [0, infinity], whereas it is in fact constrained to [b, infinity], where b is a parameter of the distribution.

This means that a variable following this distribution will have a mismatch between the values it can take, and those that return a finite log density. That doesn't affect inference (in an infinite Markov chain etc.) since those samples outside the support of the distribution will be rejected. However it does lead to very inefficient sampling, and trouble initialising the model.

The fix requires revamping how free state transformations work, so that we can use variable constraints, checking log-jacobian adjustments, and some internal architecture wrangling. Though fixing this will also mean we can let `uniform()` take greta arrays for parameters.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.