Search Results for

    Show / Hide Table of Contents

    Class SubvectorOp

    Provides outgoing messages for Subvector(Vector, Int32, Int32), given random arguments to the function.

    Inheritance
    Object
    SubvectorOp
    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(Vector), "Subvector", new Type[]{typeof(Vector), typeof(int), typeof(int)})]
    [Buffers(new string[]{"SourceMean", "SourceVariance"})]
    [Quality(QualityBand.Stable)]
    public static class SubvectorOp

    Methods

    AverageLogFactor()

    Evidence message for VMP.

    Declaration
    public static double AverageLogFactor()
    Returns
    Type Description
    Double

    Zero.

    Remarks

    The formula for the result is log(factor(subvector,source,startIndex,count)). Adding up these values across all factors and variables gives the log-evidence estimate for VMP.

    AverageLogFactor(Vector, Vector, Int32)

    Evidence message for VMP.

    Declaration
    public static double AverageLogFactor(Vector subvector, Vector source, int startIndex)
    Parameters
    Type Name Description
    Vector subvector

    Constant value for subvector.

    Vector source

    Constant value for source.

    Int32 startIndex

    Constant value for startIndex.

    Returns
    Type Description
    Double

    Zero.

    Remarks

    The formula for the result is log(factor(subvector,source,startIndex,count)). Adding up these values across all factors and variables gives the log-evidence estimate for VMP.

    LogAverageFactor(VectorGaussian, VectorGaussian)

    Evidence message for EP.

    Declaration
    public static double LogAverageFactor(VectorGaussian subvector, VectorGaussian to_subvector)
    Parameters
    Type Name Description
    VectorGaussian subvector

    Incoming message from subvector.

    VectorGaussian to_subvector

    Outgoing message to subvector.

    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_(subvector) p(subvector) factor(subvector,source,startIndex,count)).

    LogAverageFactor(Vector, Vector, PositiveDefiniteMatrix, Int32)

    Evidence message for EP.

    Declaration
    public static double LogAverageFactor(Vector subvector, Vector SourceMean, PositiveDefiniteMatrix SourceVariance, int startIndex)
    Parameters
    Type Name Description
    Vector subvector

    Constant value for subvector.

    Vector SourceMean

    Buffer SourceMean.

    PositiveDefiniteMatrix SourceVariance

    Buffer SourceVariance.

    Int32 startIndex

    Constant value for startIndex.

    Returns
    Type Description
    Double

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

    Remarks

    The formula for the result is log(factor(subvector,source,startIndex,count)).

    LogAverageFactor(Vector, Vector, Int32)

    Evidence message for EP.

    Declaration
    public static double LogAverageFactor(Vector subvector, Vector source, int startIndex)
    Parameters
    Type Name Description
    Vector subvector

    Constant value for subvector.

    Vector source

    Constant value for source.

    Int32 startIndex

    Constant value for startIndex.

    Returns
    Type Description
    Double

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

    Remarks

    The formula for the result is log(factor(subvector,source,startIndex,count)).

    LogEvidenceRatio(VectorGaussian)

    Evidence message for EP.

    Declaration
    public static double LogEvidenceRatio(VectorGaussian subvector)
    Parameters
    Type Name Description
    VectorGaussian subvector

    Incoming message from subvector.

    Returns
    Type Description
    Double

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

    Remarks

    The formula for the result is log(sum_(subvector) p(subvector) factor(subvector,source,startIndex,count) / sum_subvector p(subvector) messageTo(subvector)). Adding up these values across all factors and variables gives the log-evidence estimate for EP.

    LogEvidenceRatio(Vector, Vector, PositiveDefiniteMatrix, Int32)

    Evidence message for EP.

    Declaration
    public static double LogEvidenceRatio(Vector subvector, Vector SourceMean, PositiveDefiniteMatrix SourceVariance, int startIndex)
    Parameters
    Type Name Description
    Vector subvector

    Constant value for subvector.

    Vector SourceMean

    Buffer SourceMean.

    PositiveDefiniteMatrix SourceVariance

    Buffer SourceVariance.

    Int32 startIndex

    Constant value for startIndex.

    Returns
    Type Description
    Double

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

    Remarks

    The formula for the result is log(factor(subvector,source,startIndex,count)). Adding up these values across all factors and variables gives the log-evidence estimate for EP.

    LogEvidenceRatio(Vector, Vector, Int32)

    Evidence message for EP.

    Declaration
    public static double LogEvidenceRatio(Vector subvector, Vector source, int startIndex)
    Parameters
    Type Name Description
    Vector subvector

    Constant value for subvector.

    Vector source

    Constant value for source.

    Int32 startIndex

    Constant value for startIndex.

    Returns
    Type Description
    Double

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

    Remarks

    The formula for the result is log(factor(subvector,source,startIndex,count)). Adding up these values across all factors and variables gives the log-evidence estimate for EP.

    SourceAverageConditional(VectorGaussian, Int32, VectorGaussian)

    EP message to source.

    Declaration
    public static VectorGaussian SourceAverageConditional(VectorGaussian subvector, int startIndex, VectorGaussian result)
    Parameters
    Type Name Description
    VectorGaussian subvector

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

    Int32 startIndex

    Constant value for startIndex.

    VectorGaussian result

    Modified to contain the outgoing message.

    Returns
    Type Description
    VectorGaussian

    result

    Remarks

    The outgoing message is a distribution matching the moments of source as the random arguments are varied. The formula is proj[p(source) sum_(subvector) p(subvector) factor(subvector,source,startIndex,count)]/p(source).

    Exceptions
    Type Condition
    ImproperMessageException

    subvector is not a proper distribution.

    SourceAverageConditional(Vector, Int32, VectorGaussian)

    EP message to source.

    Declaration
    public static VectorGaussian SourceAverageConditional(Vector subvector, int startIndex, VectorGaussian result)
    Parameters
    Type Name Description
    Vector subvector

    Constant value for subvector.

    Int32 startIndex

    Constant value for startIndex.

    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 source conditioned on the given values.

    SourceAverageLogarithm(VectorGaussian, Int32, VectorGaussian)

    VMP message to source.

    Declaration
    public static VectorGaussian SourceAverageLogarithm(VectorGaussian subvector, int startIndex, VectorGaussian result)
    Parameters
    Type Name Description
    VectorGaussian subvector

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

    Int32 startIndex

    Constant value for startIndex.

    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 source with subvector integrated out. The formula is sum_subvector p(subvector) factor(subvector,source,startIndex,count).

    Exceptions
    Type Condition
    ImproperMessageException

    subvector is not a proper distribution.

    SourceAverageLogarithm(Vector, Int32, VectorGaussian)

    VMP message to source.

    Declaration
    public static VectorGaussian SourceAverageLogarithm(Vector subvector, int startIndex, VectorGaussian result)
    Parameters
    Type Name Description
    Vector subvector

    Constant value for subvector.

    Int32 startIndex

    Constant value for startIndex.

    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 source conditioned on the given values.

    SourceMean(VectorGaussian, PositiveDefiniteMatrix, Vector)

    Update the buffer SourceMean.

    Declaration
    public static Vector SourceMean(VectorGaussian Source, PositiveDefiniteMatrix SourceVariance, Vector result)
    Parameters
    Type Name Description
    VectorGaussian Source

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

    PositiveDefiniteMatrix SourceVariance

    Buffer SourceVariance.

    Vector result

    Modified to contain the outgoing message.

    Returns
    Type Description
    Vector

    result

    Remarks

    Exceptions
    Type Condition
    ImproperMessageException

    Source is not a proper distribution.

    SourceMeanInit(VectorGaussian)

    Initialize the buffer SourceMean.

    Declaration
    public static Vector SourceMeanInit(VectorGaussian Source)
    Parameters
    Type Name Description
    VectorGaussian Source

    Incoming message from source.

    Returns
    Type Description
    Vector

    Initial value of buffer SourceMean.

    Remarks

    SourceVariance(VectorGaussian, PositiveDefiniteMatrix)

    Update the buffer SourceVariance.

    Declaration
    public static PositiveDefiniteMatrix SourceVariance(VectorGaussian Source, PositiveDefiniteMatrix result)
    Parameters
    Type Name Description
    VectorGaussian Source

    Incoming message from source. 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

    Source is not a proper distribution.

    SourceVarianceInit(VectorGaussian)

    Initialize the buffer SourceVariance.

    Declaration
    public static PositiveDefiniteMatrix SourceVarianceInit(VectorGaussian Source)
    Parameters
    Type Name Description
    VectorGaussian Source

    Incoming message from source.

    Returns
    Type Description
    PositiveDefiniteMatrix

    Initial value of buffer SourceVariance.

    Remarks

    SubvectorAverageConditional(Vector, PositiveDefiniteMatrix, Int32, VectorGaussian)

    EP message to subvector.

    Declaration
    public static VectorGaussian SubvectorAverageConditional(Vector SourceMean, PositiveDefiniteMatrix SourceVariance, int startIndex, VectorGaussian result)
    Parameters
    Type Name Description
    Vector SourceMean

    Buffer SourceMean.

    PositiveDefiniteMatrix SourceVariance

    Buffer SourceVariance.

    Int32 startIndex

    Constant value for startIndex.

    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 subvector conditioned on the given values.

    SubvectorAverageConditionalInit(Int32)

    Declaration
    public static VectorGaussian SubvectorAverageConditionalInit(int count)
    Parameters
    Type Name Description
    Int32 count

    Constant value for count.

    Returns
    Type Description
    VectorGaussian
    Remarks

    SubvectorAverageLogarithm(Vector, PositiveDefiniteMatrix, Int32, VectorGaussian)

    VMP message to subvector.

    Declaration
    public static VectorGaussian SubvectorAverageLogarithm(Vector SourceMean, PositiveDefiniteMatrix SourceVariance, int startIndex, VectorGaussian result)
    Parameters
    Type Name Description
    Vector SourceMean

    Buffer SourceMean.

    PositiveDefiniteMatrix SourceVariance

    Buffer SourceVariance.

    Int32 startIndex

    Constant value for startIndex.

    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 subvector conditioned on the given values.

    SubvectorAverageLogarithmInit(Int32)

    Declaration
    public static VectorGaussian SubvectorAverageLogarithmInit(int count)
    Parameters
    Type Name Description
    Int32 count

    Constant value for count.

    Returns
    Type Description
    VectorGaussian
    Remarks

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