Skip to content

DOC: Fix mathematical notation in conditional_logprob docstrings #6798

Closed
@larryshamalama

Description

@larryshamalama

Description

Nitpick issue here

  • $\Sigma$ is conventionally used for covariance matrices, so I prefer using $\sigma$ since the example is univariate.

pymc/pymc/logprob/basic.py

Lines 433 to 434 in 7b08fc1

\Sigma^2 \sim& \operatorname{InvGamma}(0.5, 0.5) \\
Y \sim& \operatorname{N}(0, \Sigma)

  • For continuous-valued random variables, I would prefer not writing $P(Y = y)$ because, in principle, it is always zero.

    pymc/pymc/logprob/basic.py

    Lines 448 to 449 in 7b08fc1

    \log p(Y = y, \Sigma^2 = \sigma^2) =
    \log p(Y = y \mid \Sigma^2 = \sigma^2) + \log p(\Sigma^2 = \sigma^2)

What I would recommend is perhaps to use the random variables as indices to the log-density and valued variables as arguments to delineate their differences while addressing the point above: $\log p_{Y, \sigma^2}(y, s^2) = \log p_{Y \mid \sigma^2}(y \mid \sigma^2 = s^2) + \log p_{\sigma^2}(s^2)$. To me, this is better, but maybe not for everyone...

The last instance where change may be needed is:

conditional log-probability :math:`\log p(Y = y \mid \Sigma^2)`, with a stochastic

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions