Skip to content

Vector size  #33

Description

@haohaiziround

Should we use n by 1 or length n for the size of a vector, eg. [0, 0]?

There is some inconsistent issue with these in the mvn.

For example,

dist1 = MultivariateNormal(mu1=[0, 0], covariance_matrix=[[1, 0], [0, 1]])
dist2 = MultivariateNormal(mu2=[[0], [0]], covariance_matrix=[[1, 0], [0, 1]])

when we do the VariableCast for mu1 and mu2, they will be squeezed and turned into [0,0] and then a Variable. In other words, both mu will have size 2. However, if we draw sample from dist1 and dist2, which should be a vector and have the same size of mu, the size of the sample will be 1 by 2. It will be much clear in debug.

We need to solve this: either squeeze the sample or always ensure 1 by n or n by 1 for the size of vector.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

No labels
No labels

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions