Skip to content

Standard MvNormal, Inconsistency with Normal, and IΒ #826

Closed
@jessebett

Description

MvNormal is inconsistent with the syntax for Normal

Constructing a standard univariate Normal is achieved by Normal()
However, MvNormal() is not defined.
I understand this is ambiguous in dimensionality. However it isn't ambiguous to do something like evaluate the pdf of a d-dimensional vector under an MvNormal, as it will necessarily be d dimensional. I wonder if there is a way to have the standard normal defined without dimension stated, for evaluating densities, but sampling from this will obviously not be defined.

When Normal dispatches on a single argument it corresponds to the mean, but when MvNormal dispatches on a single argument it corresponds to the diagonal vector of its sigma... this is pretty strange.
An extreme example is Normal(1.) is a gaussian with mu=1 and sig=1, but MvNormal([1.]) is a 1D gaussian with mu=0 and sig=0...

MvNormal has not been updated to take I for the identity.
The documentation needs to change as well, as it refers to eye(d).

The current way to define a standard d-dimensional multivariate normal isn't great MvNormal(zeros(d),Matrix(I,d,d))

I would like MvNormal(d=3) to produce a 3-dimensional standard multivariate normal.
MvNormal(zeros(3),I) should work as well.

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