tensorflow / tensorflow/probability
Missing Inverse Wishart - redefine Wishart?
Nobody has claimed this yet.
- Dominant language
- Jupyter Notebook
- Stars
- 4.4k
- Forks
- 1.1k
- PR merge metrics
- No merged PRs in 30d
Description
This seems like an odd distribution to be missing, especially given that it is the standard conjugate prior for the covariance matrix of multivariate normals.
Technically, it can be instantiated by making a TransformedDistribution with Wishart as the base, and Invert(CholeskyOuterProduct), CholeskyToInvCholesky and CholeskyOuterProduct but this incurs the cost of a cholesky factorization and cannot make use of the Wishart's input_output_cholesky flag (which is a bit inconsistent with the rest of TFP?).
I think the most OOP design choice would be to remove the existing Wisharts and define a new WishartCholesky distribution, as this density is fairly easy and analytic (see Bartlett decomposition). I believe that is what TFP is already using to sample Wisharts, so it's not a big jump. The full Wishart and the inverse Wishart can then be easily parameterized using bijectors.
The Wishart cholesky consists of a triangular matrix with below-diagonal elements following one distribution, and the diagonal elements following another. Is there any way to specify that using TransformedDistribution and bijectors? It seems there is a need for transformed densities on multiple variables, concatenation bijectors, and/or better triangle-filling bijectors?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
The issue points to Wishart, TransformedDistribution, bijectors, and the Bartlett decomposition as the relevant entry points; start by reviewing their existing APIs and how Wishart sampling is represented. Done requires an agreed design for inverse-Wishart support, including whether a cholesky-form distribution and multi-variable transformations are needed.
Written by the indexing model from the issue text.
Assessment
- Domain
- machine-learning
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100