none
What is the difference between VariableArray<double> and Variable<Vector>

    Question

  • In the Infer.NET 101 CyclingTime3 it uses both and I don't really get the difference.  Thanks.

     AverageTime = Variable.Array<double>(ComponentRange);

    MixingCoefficients = Variable<Vector>.Random(MixingPrior)

     


    • Edited by AceHack Sunday, January 15, 2012 8:01 AM
    Sunday, January 15, 2012 8:01 AM

All replies

  • It depends on whether there are dependencies between the elements. For example, the elements of a probability vector which parameterises a Discrete distribution must be consider as a whole - there is a dependency between them as they must add to 1. Or we may want to learn the full covariances for a weight vector in a Bayes Point Machine.

    Based on these considerations, some distributions (Dirichlet, Discrete, and VectorGaussian) are defined over vectors, and the related factors support these distributions. Random variables that are defined in terms of these distributions and factors must then be of type Vector. See Variable types and their distributions.

    VariableArray<double> is used to represent a replicated piece of your graphical model and does not specify any explicit dependency between elements of the array. You can have VariableArray<Vector> or any other type of random array variable.

    Monday, January 16, 2012 1:45 PM
    Owner