Search Results for

    Show / Hide Table of Contents

    Class VectorElementOp

    Provides outgoing messages for GetItem<T>(IReadOnlyList<T>, Int32), given random arguments to the function.

    Inheritance
    Object
    VectorElementOp
    Inherited Members
    Object.Equals(Object)
    Object.Equals(Object, Object)
    Object.GetHashCode()
    Object.GetType()
    Object.MemberwiseClone()
    Object.ReferenceEquals(Object, Object)
    Object.ToString()
    Namespace: Microsoft.ML.Probabilistic.Factors
    Assembly: Microsoft.ML.Probabilistic.dll
    Syntax
    [FactorMethod(typeof(Collection), "GetItem<>", new Type[]{typeof(double), typeof(Vector), typeof(int)})]
    [Buffers(new string[]{"ArrayMean", "ArrayVariance"})]
    [Quality(QualityBand.Preview)]
    public static class VectorElementOp

    Methods

    ArrayAverageConditional(Gaussian, Int32, VectorGaussian)

    EP message to array.

    Declaration
    public static VectorGaussian ArrayAverageConditional(Gaussian item, int index, VectorGaussian result)
    Parameters
    Type Name Description
    Gaussian item

    Incoming message from item. Must be a proper distribution. If uniform, the result will be uniform.

    Int32 index

    Constant value for index.

    VectorGaussian result

    Modified to contain the outgoing message.

    Returns
    Type Description
    VectorGaussian

    result

    Remarks

    The outgoing message is a distribution matching the moments of array as the random arguments are varied. The formula is proj[p(array) sum_(item) p(item) factor(item,array,index)]/p(array).

    Exceptions
    Type Condition
    ImproperMessageException

    item is not a proper distribution.

    ArrayAverageConditional(Double, Int32, VectorGaussian)

    EP message to array.

    Declaration
    public static VectorGaussian ArrayAverageConditional(double item, int index, VectorGaussian result)
    Parameters
    Type Name Description
    Double item

    Constant value for item.

    Int32 index

    Constant value for index.

    VectorGaussian result

    Modified to contain the outgoing message.

    Returns
    Type Description
    VectorGaussian

    result

    Remarks

    The outgoing message is the factor viewed as a function of array conditioned on the given values.

    ArrayAverageLogarithm(Gaussian, Int32, VectorGaussian)

    VMP message to array.

    Declaration
    public static VectorGaussian ArrayAverageLogarithm(Gaussian item, int index, VectorGaussian result)
    Parameters
    Type Name Description
    Gaussian item

    Incoming message from item. Must be a proper distribution. If uniform, the result will be uniform.

    Int32 index

    Constant value for index.

    VectorGaussian result

    Modified to contain the outgoing message.

    Returns
    Type Description
    VectorGaussian

    result

    Remarks

    The outgoing message is the factor viewed as a function of array with item integrated out. The formula is sum_item p(item) factor(item,array,index).

    Exceptions
    Type Condition
    ImproperMessageException

    item is not a proper distribution.

    ArrayAverageLogarithm(Double, Int32, VectorGaussian)

    VMP message to array.

    Declaration
    public static VectorGaussian ArrayAverageLogarithm(double item, int index, VectorGaussian result)
    Parameters
    Type Name Description
    Double item

    Constant value for item.

    Int32 index

    Constant value for index.

    VectorGaussian result

    Modified to contain the outgoing message.

    Returns
    Type Description
    VectorGaussian

    result

    Remarks

    The outgoing message is the factor viewed as a function of array conditioned on the given values.

    ArrayMean(VectorGaussian, PositiveDefiniteMatrix, Vector)

    Update the buffer ArrayMean.

    Declaration
    public static Vector ArrayMean(VectorGaussian array, PositiveDefiniteMatrix ArrayVariance, Vector result)
    Parameters
    Type Name Description
    VectorGaussian array

    Incoming message from array. Must be a proper distribution. If any element is uniform, the result will be uniform.

    PositiveDefiniteMatrix ArrayVariance

    Buffer ArrayVariance.

    Vector result

    Modified to contain the outgoing message.

    Returns
    Type Description
    Vector

    result

    Remarks

    Exceptions
    Type Condition
    ImproperMessageException

    array is not a proper distribution.

    ArrayMeanInit(VectorGaussian)

    Initialize the buffer ArrayMean.

    Declaration
    public static Vector ArrayMeanInit(VectorGaussian array)
    Parameters
    Type Name Description
    VectorGaussian array

    Incoming message from array.

    Returns
    Type Description
    Vector

    Initial value of buffer ArrayMean.

    Remarks

    ArrayVariance(VectorGaussian, PositiveDefiniteMatrix)

    Update the buffer ArrayVariance.

    Declaration
    public static PositiveDefiniteMatrix ArrayVariance(VectorGaussian array, PositiveDefiniteMatrix result)
    Parameters
    Type Name Description
    VectorGaussian array

    Incoming message from array. Must be a proper distribution. If any element is uniform, the result will be uniform.

    PositiveDefiniteMatrix result

    Modified to contain the outgoing message.

    Returns
    Type Description
    PositiveDefiniteMatrix

    result

    Remarks

    Exceptions
    Type Condition
    ImproperMessageException

    array is not a proper distribution.

    ArrayVarianceInit(VectorGaussian)

    Initialize the buffer ArrayVariance.

    Declaration
    public static PositiveDefiniteMatrix ArrayVarianceInit(VectorGaussian array)
    Parameters
    Type Name Description
    VectorGaussian array

    Incoming message from array.

    Returns
    Type Description
    PositiveDefiniteMatrix

    Initial value of buffer ArrayVariance.

    Remarks

    AverageLogFactor(Gaussian, VectorGaussian)

    Evidence message for VMP.

    Declaration
    public static double AverageLogFactor(Gaussian item, VectorGaussian array)
    Parameters
    Type Name Description
    Gaussian item

    Incoming message from item.

    VectorGaussian array

    Incoming message from array.

    Returns
    Type Description
    Double

    Zero.

    Remarks

    In Variational Message Passing, the evidence contribution of a deterministic factor is zero. Adding up these values across all factors and variables gives the log-evidence estimate for VMP.

    AverageLogFactor(Double, VectorGaussian, Vector, PositiveDefiniteMatrix, Int32)

    Evidence message for VMP.

    Declaration
    public static double AverageLogFactor(double item, VectorGaussian array, Vector ArrayMean, PositiveDefiniteMatrix ArrayVariance, int index)
    Parameters
    Type Name Description
    Double item

    Constant value for item.

    VectorGaussian array

    Incoming message from array. Must be a proper distribution. If any element is uniform, the result will be uniform.

    Vector ArrayMean

    Buffer ArrayMean.

    PositiveDefiniteMatrix ArrayVariance

    Buffer ArrayVariance.

    Int32 index

    Constant value for index.

    Returns
    Type Description
    Double

    Zero.

    Remarks

    In Variational Message Passing, the evidence contribution of a deterministic factor is zero. Adding up these values across all factors and variables gives the log-evidence estimate for VMP.

    Exceptions
    Type Condition
    ImproperMessageException

    array is not a proper distribution.

    ItemAverageConditional(VectorGaussian, Vector, PositiveDefiniteMatrix, Int32)

    EP message to item.

    Declaration
    public static Gaussian ItemAverageConditional(VectorGaussian array, Vector ArrayMean, PositiveDefiniteMatrix ArrayVariance, int index)
    Parameters
    Type Name Description
    VectorGaussian array

    Incoming message from array. Must be a proper distribution. If any element is uniform, the result will be uniform.

    Vector ArrayMean

    Buffer ArrayMean.

    PositiveDefiniteMatrix ArrayVariance

    Buffer ArrayVariance.

    Int32 index

    Constant value for index.

    Returns
    Type Description
    Gaussian

    The outgoing EP message to the item argument.

    Remarks

    The outgoing message is a distribution matching the moments of item as the random arguments are varied. The formula is proj[p(item) sum_(array) p(array) factor(item,array,index)]/p(item).

    Exceptions
    Type Condition
    ImproperMessageException

    array is not a proper distribution.

    ItemAverageConditionalInit()

    Declaration
    public static Gaussian ItemAverageConditionalInit()
    Returns
    Type Description
    Gaussian
    Remarks

    ItemAverageLogarithm(VectorGaussian, Vector, PositiveDefiniteMatrix, Int32)

    VMP message to item.

    Declaration
    public static Gaussian ItemAverageLogarithm(VectorGaussian array, Vector ArrayMean, PositiveDefiniteMatrix ArrayVariance, int index)
    Parameters
    Type Name Description
    VectorGaussian array

    Incoming message from array. Must be a proper distribution. If any element is uniform, the result will be uniform.

    Vector ArrayMean

    Buffer ArrayMean.

    PositiveDefiniteMatrix ArrayVariance

    Buffer ArrayVariance.

    Int32 index

    Constant value for index.

    Returns
    Type Description
    Gaussian

    The outgoing VMP message to the item argument.

    Remarks

    The outgoing message is a distribution matching the moments of item as the random arguments are varied. The formula is proj[sum_(array) p(array) factor(item,array,index)].

    Exceptions
    Type Condition
    ImproperMessageException

    array is not a proper distribution.

    ItemAverageLogarithmInit()

    Declaration
    public static Gaussian ItemAverageLogarithmInit()
    Returns
    Type Description
    Gaussian
    Remarks

    LogAverageFactor(Double, VectorGaussian, Vector, PositiveDefiniteMatrix, Int32)

    Evidence message for EP.

    Declaration
    public static double LogAverageFactor(double item, VectorGaussian array, Vector ArrayMean, PositiveDefiniteMatrix ArrayVariance, int index)
    Parameters
    Type Name Description
    Double item

    Constant value for item.

    VectorGaussian array

    Incoming message from array. Must be a proper distribution. If any element is uniform, the result will be uniform.

    Vector ArrayMean

    Buffer ArrayMean.

    PositiveDefiniteMatrix ArrayVariance

    Buffer ArrayVariance.

    Int32 index

    Constant value for index.

    Returns
    Type Description
    Double

    Logarithm of the factor's average value across the given argument distributions.

    Remarks

    The formula for the result is log(sum_(array) p(array) factor(item,array,index)).

    Exceptions
    Type Condition
    ImproperMessageException

    array is not a proper distribution.

    LogEvidenceRatio(Double, VectorGaussian, Vector, PositiveDefiniteMatrix, Int32)

    Evidence message for EP.

    Declaration
    public static double LogEvidenceRatio(double item, VectorGaussian array, Vector ArrayMean, PositiveDefiniteMatrix ArrayVariance, int index)
    Parameters
    Type Name Description
    Double item

    Constant value for item.

    VectorGaussian array

    Incoming message from array. Must be a proper distribution. If any element is uniform, the result will be uniform.

    Vector ArrayMean

    Buffer ArrayMean.

    PositiveDefiniteMatrix ArrayVariance

    Buffer ArrayVariance.

    Int32 index

    Constant value for index.

    Returns
    Type Description
    Double

    Logarithm of the factor's contribution the EP model evidence.

    Remarks

    The formula for the result is log(sum_(array) p(array) factor(item,array,index)). Adding up these values across all factors and variables gives the log-evidence estimate for EP.

    Exceptions
    Type Condition
    ImproperMessageException

    array is not a proper distribution.

    In This Article
    Back to top Copyright © .NET Foundation. All rights reserved.