You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The MvNormal makes different assumptions depending on dim being 1 or more. For dim=1, it takes the argument as the std, while for dim=2+ it takes the argument as the cov:
which seems dangerous. Probably having the constructor for the diagonal normal receive a vector of variances would make things more consistent and safer.
The text was updated successfully, but these errors were encountered:
IMO the constructors for distributions are generally a bit confusing since they only use positional arguments. I think constructors with keyword arguments would be a lot clearer.
However, I disagree with the OP here, there is really no inconsistency here - vectors and matrices are fundamentally different types so it is fine to treat them differently. Moreover, vectors are treated in the same way as scalars and the second positional argument in the Normal constructor, they all indicate standard deviations. If you want to provide a vector of variances you can just provide a Diagonal matrix:
I'll close this issue since it is a duplicate of #584 and #1203. The proposed fix for the incosistencies in #1203 (comment) was to deprecate the constructors with a scalar standard deviation and a vector and only accept matrices. I think this is the way to go.
The
MvNormal
makes different assumptions depending ondim
being 1 or more. Fordim=1
, it takes the argument as the std, while fordim=2+
it takes the argument as the cov:I understand that it is calling different constructors. In the second case, it assumes it's receiving a vector of stds:
but this leads to a situation like this:
which seems dangerous. Probably having the constructor for the diagonal normal receive a vector of variances would make things more consistent and safer.
The text was updated successfully, but these errors were encountered: