Search Results for

    Show / Hide Table of Contents

    Class InnerProductOpBase

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

    Inheritance
    Object
    InnerProductOpBase
    InnerProductOp
    InnerProductOp_PointB
    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
    public class InnerProductOpBase

    Methods

    AAverageConditional(Gaussian, Vector, VectorGaussian)

    EP message to a.

    Declaration
    public static VectorGaussian AAverageConditional(Gaussian innerProduct, Vector B, VectorGaussian result)
    Parameters
    Type Name Description
    Gaussian innerProduct

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

    Vector B

    Constant value for b.

    VectorGaussian result

    Modified to contain the outgoing message.

    Returns
    Type Description
    VectorGaussian

    result

    Remarks

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

    Exceptions
    Type Condition
    ImproperMessageException

    innerProduct is not a proper distribution.

    AAverageConditional(Gaussian, Vector, DenseVector, PositiveDefiniteMatrix, VectorGaussian)

    EP message to a.

    Declaration
    public static VectorGaussian AAverageConditional(Gaussian innerProduct, Vector A, DenseVector BMean, PositiveDefiniteMatrix BVariance, VectorGaussian result)
    Parameters
    Type Name Description
    Gaussian innerProduct

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

    Vector A

    Constant value for a.

    DenseVector BMean

    Buffer BMean.

    PositiveDefiniteMatrix BVariance

    Buffer BVariance.

    VectorGaussian result

    Modified to contain the outgoing message.

    Returns
    Type Description
    VectorGaussian

    result

    Remarks

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

    Exceptions
    Type Condition
    ImproperMessageException

    innerProduct is not a proper distribution.

    AAverageConditional(Double, Vector, VectorGaussian)

    EP message to a.

    Declaration
    [NotSupported("A InnerProduct factor with fixed output is not yet implemented.")]
    public static VectorGaussian AAverageConditional(double innerProduct, Vector B, VectorGaussian result)
    Parameters
    Type Name Description
    Double innerProduct

    Constant value for innerProduct.

    Vector B

    Constant value for b.

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

    AAverageLogarithm(Gaussian, VectorGaussian, DenseVector, PositiveDefiniteMatrix, VectorGaussian)

    VMP message to a.

    Declaration
    public static VectorGaussian AAverageLogarithm(Gaussian innerProduct, VectorGaussian B, DenseVector BMean, PositiveDefiniteMatrix BVariance, VectorGaussian result)
    Parameters
    Type Name Description
    Gaussian innerProduct

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

    VectorGaussian B

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

    DenseVector BMean

    Buffer BMean.

    PositiveDefiniteMatrix BVariance

    Buffer BVariance.

    VectorGaussian result

    Modified to contain the outgoing message.

    Returns
    Type Description
    VectorGaussian

    result

    Remarks

    The outgoing message is the exponential of the average log-factor value, where the average is over all arguments except a. Because the factor is deterministic, innerProduct is integrated out before taking the logarithm. The formula is exp(sum_(b) p(b) log(sum_innerProduct p(innerProduct) factor(innerProduct,a,b))).

    Exceptions
    Type Condition
    ImproperMessageException

    innerProduct is not a proper distribution.

    ImproperMessageException

    B is not a proper distribution.

    AAverageLogarithm(Gaussian, Vector, VectorGaussian)

    VMP message to a.

    Declaration
    public static VectorGaussian AAverageLogarithm(Gaussian innerProduct, Vector B, VectorGaussian result)
    Parameters
    Type Name Description
    Gaussian innerProduct

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

    Vector B

    Constant value for b.

    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 a with innerProduct integrated out. The formula is sum_innerProduct p(innerProduct) factor(innerProduct,a,b).

    Exceptions
    Type Condition
    ImproperMessageException

    innerProduct is not a proper distribution.

    AAverageLogarithm(Double, VectorGaussian, VectorGaussian)

    VMP message to a.

    Declaration
    [NotSupported("Variational Message Passing does not support an InnerProduct factor with fixed output.")]
    public static VectorGaussian AAverageLogarithm(double innerProduct, VectorGaussian B, VectorGaussian result)
    Parameters
    Type Name Description
    Double innerProduct

    Constant value for innerProduct.

    VectorGaussian B

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

    VectorGaussian result

    Modified to contain the outgoing message.

    Returns
    Type Description
    VectorGaussian

    result

    Remarks

    The outgoing message is the exponential of the average log-factor value, where the average is over all arguments except a. The formula is exp(sum_(b) p(b) log(factor(innerProduct,a,b))).

    Exceptions
    Type Condition
    ImproperMessageException

    B is not a proper distribution.

    AAverageLogarithm(Double, Vector, VectorGaussian)

    VMP message to a.

    Declaration
    [NotSupported("A InnerProduct factor with fixed output is not yet implemented.")]
    public static VectorGaussian AAverageLogarithm(double innerProduct, Vector B, VectorGaussian result)
    Parameters
    Type Name Description
    Double innerProduct

    Constant value for innerProduct.

    Vector B

    Constant value for b.

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

    AMean(VectorGaussian, PositiveDefiniteMatrix, DenseVector)

    Update the buffer AMean.

    Declaration
    public static DenseVector AMean(VectorGaussian A, PositiveDefiniteMatrix AVariance, DenseVector result)
    Parameters
    Type Name Description
    VectorGaussian A

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

    PositiveDefiniteMatrix AVariance

    Buffer AVariance.

    DenseVector result

    Modified to contain the outgoing message.

    Returns
    Type Description
    DenseVector

    result

    Remarks

    Exceptions
    Type Condition
    ImproperMessageException

    A is not a proper distribution.

    AMeanInit(VectorGaussian)

    Initialize the buffer AMean.

    Declaration
    public static DenseVector AMeanInit(VectorGaussian A)
    Parameters
    Type Name Description
    VectorGaussian A

    Incoming message from a.

    Returns
    Type Description
    DenseVector

    Initial value of buffer AMean.

    Remarks

    AVariance(VectorGaussian, PositiveDefiniteMatrix)

    Update the buffer AVariance.

    Declaration
    public static PositiveDefiniteMatrix AVariance(VectorGaussian A, PositiveDefiniteMatrix result)
    Parameters
    Type Name Description
    VectorGaussian A

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

    A is not a proper distribution.

    AVarianceInit(VectorGaussian)

    Initialize the buffer AVariance.

    Declaration
    public static PositiveDefiniteMatrix AVarianceInit(VectorGaussian A)
    Parameters
    Type Name Description
    VectorGaussian A

    Incoming message from a.

    Returns
    Type Description
    PositiveDefiniteMatrix

    Initial value of buffer AVariance.

    Remarks

    AverageLogFactor()

    Evidence message for VMP.

    Declaration
    public static double AverageLogFactor()
    Returns
    Type Description
    Double

    Zero.

    Remarks

    The formula for the result is log(factor(innerProduct,a,b)). Adding up these values across all factors and variables gives the log-evidence estimate for VMP.

    BAverageConditional(Gaussian, Vector, VectorGaussian)

    EP message to b.

    Declaration
    public static VectorGaussian BAverageConditional(Gaussian innerProduct, Vector A, VectorGaussian result)
    Parameters
    Type Name Description
    Gaussian innerProduct

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

    Vector A

    Constant value for a.

    VectorGaussian result

    Modified to contain the outgoing message.

    Returns
    Type Description
    VectorGaussian

    result

    Remarks

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

    Exceptions
    Type Condition
    ImproperMessageException

    innerProduct is not a proper distribution.

    BAverageConditional(Double, Vector, VectorGaussian)

    EP message to b.

    Declaration
    [NotSupported("A InnerProduct factor with fixed output is not yet implemented.")]
    public static VectorGaussian BAverageConditional(double innerProduct, Vector A, VectorGaussian result)
    Parameters
    Type Name Description
    Double innerProduct

    Constant value for innerProduct.

    Vector A

    Constant value for a.

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

    BAverageLogarithm(Gaussian, VectorGaussian, DenseVector, PositiveDefiniteMatrix, VectorGaussian)

    VMP message to b.

    Declaration
    public static VectorGaussian BAverageLogarithm(Gaussian innerProduct, VectorGaussian A, DenseVector AMean, PositiveDefiniteMatrix AVariance, VectorGaussian result)
    Parameters
    Type Name Description
    Gaussian innerProduct

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

    VectorGaussian A

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

    DenseVector AMean

    Buffer AMean.

    PositiveDefiniteMatrix AVariance

    Buffer AVariance.

    VectorGaussian result

    Modified to contain the outgoing message.

    Returns
    Type Description
    VectorGaussian

    result

    Remarks

    The outgoing message is the exponential of the average log-factor value, where the average is over all arguments except b. Because the factor is deterministic, innerProduct is integrated out before taking the logarithm. The formula is exp(sum_(a) p(a) log(sum_innerProduct p(innerProduct) factor(innerProduct,a,b))).

    Exceptions
    Type Condition
    ImproperMessageException

    innerProduct is not a proper distribution.

    ImproperMessageException

    A is not a proper distribution.

    BAverageLogarithm(Gaussian, Vector, VectorGaussian)

    VMP message to b.

    Declaration
    public static VectorGaussian BAverageLogarithm(Gaussian innerProduct, Vector A, VectorGaussian result)
    Parameters
    Type Name Description
    Gaussian innerProduct

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

    Vector A

    Constant value for a.

    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 b with innerProduct integrated out. The formula is sum_innerProduct p(innerProduct) factor(innerProduct,a,b).

    Exceptions
    Type Condition
    ImproperMessageException

    innerProduct is not a proper distribution.

    BAverageLogarithm(Double, VectorGaussian, VectorGaussian)

    VMP message to b.

    Declaration
    [NotSupported("Variational Message Passing does not support an InnerProduct factor with fixed output.")]
    public static VectorGaussian BAverageLogarithm(double innerProduct, VectorGaussian A, VectorGaussian result)
    Parameters
    Type Name Description
    Double innerProduct

    Constant value for innerProduct.

    VectorGaussian A

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

    VectorGaussian result

    Modified to contain the outgoing message.

    Returns
    Type Description
    VectorGaussian

    result

    Remarks

    The outgoing message is the exponential of the average log-factor value, where the average is over all arguments except b. The formula is exp(sum_(a) p(a) log(factor(innerProduct,a,b))).

    Exceptions
    Type Condition
    ImproperMessageException

    A is not a proper distribution.

    BAverageLogarithm(Double, Vector, VectorGaussian)

    VMP message to b.

    Declaration
    [NotSupported("A InnerProduct factor with fixed output is not yet implemented.")]
    public static VectorGaussian BAverageLogarithm(double innerProduct, Vector A, VectorGaussian result)
    Parameters
    Type Name Description
    Double innerProduct

    Constant value for innerProduct.

    Vector A

    Constant value for a.

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

    BMean(VectorGaussian, PositiveDefiniteMatrix, DenseVector)

    Update the buffer BMean.

    Declaration
    public static DenseVector BMean(VectorGaussian B, PositiveDefiniteMatrix BVariance, DenseVector result)
    Parameters
    Type Name Description
    VectorGaussian B

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

    PositiveDefiniteMatrix BVariance

    Buffer BVariance.

    DenseVector result

    Modified to contain the outgoing message.

    Returns
    Type Description
    DenseVector

    result

    Remarks

    Exceptions
    Type Condition
    ImproperMessageException

    B is not a proper distribution.

    BMeanInit(VectorGaussian)

    Initialize the buffer BMean.

    Declaration
    public static DenseVector BMeanInit(VectorGaussian B)
    Parameters
    Type Name Description
    VectorGaussian B

    Incoming message from b.

    Returns
    Type Description
    DenseVector

    Initial value of buffer BMean.

    Remarks

    BVariance(VectorGaussian, PositiveDefiniteMatrix)

    Update the buffer BVariance.

    Declaration
    public static PositiveDefiniteMatrix BVariance(VectorGaussian B, PositiveDefiniteMatrix result)
    Parameters
    Type Name Description
    VectorGaussian B

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

    B is not a proper distribution.

    BVarianceInit(VectorGaussian)

    Initialize the buffer BVariance.

    Declaration
    public static PositiveDefiniteMatrix BVarianceInit(VectorGaussian B)
    Parameters
    Type Name Description
    VectorGaussian B

    Incoming message from b.

    Returns
    Type Description
    PositiveDefiniteMatrix

    Initial value of buffer BVariance.

    Remarks

    InnerProductAverageConditional(DenseVector, PositiveDefiniteMatrix, Vector)

    EP message to innerProduct.

    Declaration
    public static Gaussian InnerProductAverageConditional(DenseVector AMean, PositiveDefiniteMatrix AVariance, Vector B)
    Parameters
    Type Name Description
    DenseVector AMean

    Buffer AMean.

    PositiveDefiniteMatrix AVariance

    Buffer AVariance.

    Vector B

    Constant value for b.

    Returns
    Type Description
    Gaussian

    The outgoing EP message to the innerProduct argument.

    Remarks

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

    InnerProductAverageConditional(Vector, DenseVector, PositiveDefiniteMatrix)

    EP message to innerProduct.

    Declaration
    public static Gaussian InnerProductAverageConditional(Vector A, DenseVector BMean, PositiveDefiniteMatrix BVariance)
    Parameters
    Type Name Description
    Vector A

    Constant value for a.

    DenseVector BMean

    Buffer BMean.

    PositiveDefiniteMatrix BVariance

    Buffer BVariance.

    Returns
    Type Description
    Gaussian

    The outgoing EP message to the innerProduct argument.

    Remarks

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

    InnerProductAverageConditionalInit()

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

    InnerProductAverageLogarithm(DenseVector, PositiveDefiniteMatrix, DenseVector, PositiveDefiniteMatrix)

    VMP message to innerProduct.

    Declaration
    public static Gaussian InnerProductAverageLogarithm(DenseVector AMean, PositiveDefiniteMatrix AVariance, DenseVector BMean, PositiveDefiniteMatrix BVariance)
    Parameters
    Type Name Description
    DenseVector AMean

    Buffer AMean.

    PositiveDefiniteMatrix AVariance

    Buffer AVariance.

    DenseVector BMean

    Buffer BMean.

    PositiveDefiniteMatrix BVariance

    Buffer BVariance.

    Returns
    Type Description
    Gaussian

    The outgoing VMP message to the innerProduct argument.

    Remarks

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

    InnerProductAverageLogarithm(DenseVector, PositiveDefiniteMatrix, Vector)

    VMP message to innerProduct.

    Declaration
    public static Gaussian InnerProductAverageLogarithm(DenseVector AMean, PositiveDefiniteMatrix AVariance, Vector B)
    Parameters
    Type Name Description
    DenseVector AMean

    Buffer AMean.

    PositiveDefiniteMatrix AVariance

    Buffer AVariance.

    Vector B

    Constant value for b.

    Returns
    Type Description
    Gaussian

    The outgoing VMP message to the innerProduct argument.

    Remarks

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

    InnerProductAverageLogarithm(Vector, DenseVector, PositiveDefiniteMatrix)

    VMP message to innerProduct.

    Declaration
    public static Gaussian InnerProductAverageLogarithm(Vector A, DenseVector BMean, PositiveDefiniteMatrix BVariance)
    Parameters
    Type Name Description
    Vector A

    Constant value for a.

    DenseVector BMean

    Buffer BMean.

    PositiveDefiniteMatrix BVariance

    Buffer BVariance.

    Returns
    Type Description
    Gaussian

    The outgoing VMP message to the innerProduct argument.

    Remarks

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

    InnerProductAverageLogarithmInit()

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

    LogAverageFactor(Gaussian, Gaussian)

    Evidence message for EP.

    Declaration
    public static double LogAverageFactor(Gaussian innerProduct, Gaussian to_innerProduct)
    Parameters
    Type Name Description
    Gaussian innerProduct

    Incoming message from innerProduct.

    Gaussian to_innerProduct

    Outgoing message to innerProduct.

    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_(innerProduct) p(innerProduct) factor(innerProduct,a,b)).

    LogAverageFactor(Double, DenseVector, PositiveDefiniteMatrix, Vector)

    Evidence message for EP.

    Declaration
    public static double LogAverageFactor(double innerProduct, DenseVector AMean, PositiveDefiniteMatrix AVariance, Vector B)
    Parameters
    Type Name Description
    Double innerProduct

    Constant value for innerProduct.

    DenseVector AMean

    Buffer AMean.

    PositiveDefiniteMatrix AVariance

    Buffer AVariance.

    Vector B

    Constant value for b.

    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(innerProduct,a,b)).

    LogAverageFactor(Double, Vector, DenseVector, PositiveDefiniteMatrix)

    Evidence message for EP.

    Declaration
    public static double LogAverageFactor(double innerProduct, Vector A, DenseVector BMean, PositiveDefiniteMatrix BVariance)
    Parameters
    Type Name Description
    Double innerProduct

    Constant value for innerProduct.

    Vector A

    Constant value for a.

    DenseVector BMean

    Buffer BMean.

    PositiveDefiniteMatrix BVariance

    Buffer BVariance.

    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(innerProduct,a,b)).

    LogEvidenceRatio(Gaussian, VectorGaussian, Vector)

    Evidence message for EP.

    Declaration
    public static double LogEvidenceRatio(Gaussian innerProduct, VectorGaussian a, Vector B)
    Parameters
    Type Name Description
    Gaussian innerProduct

    Incoming message from innerProduct.

    VectorGaussian a

    Incoming message from a.

    Vector B

    Constant value for b.

    Returns
    Type Description
    Double

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

    Remarks

    The formula for the result is log(sum_(innerProduct,a) p(innerProduct,a) factor(innerProduct,a,b) / sum_innerProduct p(innerProduct) messageTo(innerProduct)). Adding up these values across all factors and variables gives the log-evidence estimate for EP.

    LogEvidenceRatio(Gaussian, Vector, VectorGaussian)

    Evidence message for EP.

    Declaration
    public static double LogEvidenceRatio(Gaussian innerProduct, Vector A, VectorGaussian b)
    Parameters
    Type Name Description
    Gaussian innerProduct

    Incoming message from innerProduct.

    Vector A

    Constant value for a.

    VectorGaussian b

    Incoming message from b.

    Returns
    Type Description
    Double

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

    Remarks

    The formula for the result is log(sum_(innerProduct,b) p(innerProduct,b) factor(innerProduct,a,b) / sum_innerProduct p(innerProduct) messageTo(innerProduct)). Adding up these values across all factors and variables gives the log-evidence estimate for EP.

    LogEvidenceRatio(Double, DenseVector, PositiveDefiniteMatrix, Vector)

    Evidence message for EP.

    Declaration
    public static double LogEvidenceRatio(double innerProduct, DenseVector AMean, PositiveDefiniteMatrix AVariance, Vector B)
    Parameters
    Type Name Description
    Double innerProduct

    Constant value for innerProduct.

    DenseVector AMean

    Buffer AMean.

    PositiveDefiniteMatrix AVariance

    Buffer AVariance.

    Vector B

    Constant value for b.

    Returns
    Type Description
    Double

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

    Remarks

    The formula for the result is log(factor(innerProduct,a,b)). Adding up these values across all factors and variables gives the log-evidence estimate for EP.

    LogEvidenceRatio(Double, Vector, DenseVector, PositiveDefiniteMatrix)

    Evidence message for EP.

    Declaration
    public static double LogEvidenceRatio(double innerProduct, Vector A, DenseVector BMean, PositiveDefiniteMatrix BVariance)
    Parameters
    Type Name Description
    Double innerProduct

    Constant value for innerProduct.

    Vector A

    Constant value for a.

    DenseVector BMean

    Buffer BMean.

    PositiveDefiniteMatrix BVariance

    Buffer BVariance.

    Returns
    Type Description
    Double

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

    Remarks

    The formula for the result is log(factor(innerProduct,a,b)). Adding up these values across all factors and variables gives the log-evidence estimate for EP.

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