Skip to content

Adding WishartCholesky and InverseWishartCholesky #1787

Open
@sethaxen

Description

@sethaxen

The logpdf function of Wishart computes the Cholesky factorization of the input, while its rand function constructs a Cholesky factor before computing the full matrix, so, like LKJCholesky, it would be convenient to have an implementation of WishartCholesky. This would e.g. allow Turing users to perform inference on parameters with Wishart priors without computing the Cholesky factorization.

Similarly, we could implement an InverseWishartCholesky to avoid Cholesky factorizing the input in logpdf. However, rand does not benefit in this case, since it would be implemented in terms of Wishart, and the Cholesky factorization of the inverse of a matrix is not related to the Cholesky factorization of the matrix.

Side benefits are that random sampling in InverseWishart and MatrixBeta could be sped up using WishartCholesky, though for the latter, this could be a breaking change (currently the struct stores Wishart distributions).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions