Skip to content

DOC: Clarify the pm.Wishart warning (“unusable in a PyMC model”) #8196

@WenboZhangPKU

Description

@WenboZhangPKU

Issue with current documentation:

The docs for pymc.Wishart currently state: This distribution is unusable in a PyMC model. You should instead use LKJCholeskyCov or LKJCorr.
(see https://www.pymc.io/projects/docs/en/latest/api/distributions/generated/pymc.Wishart.html)

The statement “unusable in a PyMC model” is very broad and reads as “never use Wishart in PyMC”. However, in practice, the main reason cited in the warning is about using Wishart as a prior, where MCMC proposals in unconstrained space almost never land exactly on the symmetric positive definite manifold. For other situations, e.g., users who want to use Wishart only as a likelihood with observed=..., pm.Wishart actually works.

Idea or request for content:

Request: Please refine the documentation to distinguish between (a) prior use and (b) observed/likelihood use, and document the practical constraints of the current implementation.

Speficially, I suggest replacing “unusable in a PyMC model” with something more precise, e.g.:
“Not recommended / generally unusable as a prior distribution for MCMC sampling, but It may be used as a likelihood with observed in some cases, ” (or similar wording).
Additionally, it would be better to explain that Wishart is problematic because it requires proposing symmetric positive definite matrices, which is difficult for many samplers.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions