Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Standard MvNormal, Inconsistency with Normal, and I #826

Closed
jessebett opened this issue Feb 4, 2019 · 3 comments
Closed

Standard MvNormal, Inconsistency with Normal, and I #826

jessebett opened this issue Feb 4, 2019 · 3 comments

Comments

@jessebett
Copy link

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.

@AzamatB
Copy link

AzamatB commented Feb 5, 2019

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

With #30298 merged, this can be called as MvNormal(zeros(d),I(d)), but I agree with the rest

@matbesancon
Copy link
Member

@jessebett PR very welcome on this

@andreasnoack
Copy link
Member

Let's continue this conversation in #826

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants