Search Results for

    Show / Hide Table of Contents

    Class CopyOp<T>

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

    Inheritance
    Object
    CopyOp<T>
    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(Clone), "Copy<>", new Type[]{})]
    [Quality(QualityBand.Mature)]
    public static class CopyOp<T>
    Type Parameters
    Name Description
    T

    The type of the variable being copied.

    Methods

    AverageLogFactor(T, T)

    Evidence message for VMP.

    Declaration
    public static double AverageLogFactor(T copy, T Value)
    Parameters
    Type Name Description
    T copy

    Incoming message from copy.

    T Value

    Incoming message from value.

    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(TruncatedGaussian, Gaussian, Gaussian)

    Evidence message for VMP.

    Declaration
    [Quality(QualityBand.Preview)]
    public static double AverageLogFactor(TruncatedGaussian copy, Gaussian value, Gaussian to_value)
    Parameters
    Type Name Description
    TruncatedGaussian copy

    Incoming message from copy.

    Gaussian value

    Incoming message from value.

    Gaussian to_value

    Previous outgoing message to value.

    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<TDist>(TDist, TDist)

    Evidence message for VMP.

    Declaration
    public static double AverageLogFactor<TDist>(TDist copy, TDist Value)
        where TDist : IDistribution<T>
    Parameters
    Type Name Description
    TDist copy

    Incoming message from copy.

    TDist Value

    Incoming message from value.

    Returns
    Type Description
    Double

    Zero.

    Type Parameters
    Name Description
    TDist

    The type of the distribution over the variable being copied.

    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<TDist>(TDist, T)

    Evidence message for VMP.

    Declaration
    public static double AverageLogFactor<TDist>(TDist copy, T Value)
        where TDist : IDistribution<T>
    Parameters
    Type Name Description
    TDist copy

    Incoming message from copy.

    T Value

    Incoming message from value.

    Returns
    Type Description
    Double

    Zero.

    Type Parameters
    Name Description
    TDist

    The type of the distribution over the variable being copied.

    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<TDist>(T, TDist)

    Evidence message for VMP.

    Declaration
    public static double AverageLogFactor<TDist>(T copy, TDist Value)
        where TDist : IDistribution<T>
    Parameters
    Type Name Description
    T copy

    Incoming message from copy.

    TDist Value

    Incoming message from value.

    Returns
    Type Description
    Double

    Zero.

    Type Parameters
    Name Description
    TDist

    The type of the distribution over the variable being copied.

    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.

    CopyAverageConditional(T)

    EP message to copy.

    Declaration
    public static T CopyAverageConditional(T Value)
    Parameters
    Type Name Description
    T Value

    Incoming message from value.

    Returns
    Type Description
    T

    The outgoing EP message to the copy argument.

    Remarks

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

    CopyAverageConditional(TruncatedGamma)

    EP message to copy.

    Declaration
    [Quality(QualityBand.Preview)]
    public static Gamma CopyAverageConditional(TruncatedGamma value)
    Parameters
    Type Name Description
    TruncatedGamma value

    Incoming message from value.

    Returns
    Type Description
    Gamma

    The outgoing EP message to the copy argument.

    Remarks

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

    CopyAverageConditional(TruncatedGaussian)

    EP message to copy.

    Declaration
    [Quality(QualityBand.Preview)]
    public static Gaussian CopyAverageConditional(TruncatedGaussian value)
    Parameters
    Type Name Description
    TruncatedGaussian value

    Incoming message from value.

    Returns
    Type Description
    Gaussian

    The outgoing EP message to the copy argument.

    Remarks

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

    CopyAverageConditional<TDist>(TDist)

    EP message to copy.

    Declaration
    public static TDist CopyAverageConditional<TDist>(TDist Value)
        where TDist : IDistribution<T>
    Parameters
    Type Name Description
    TDist Value

    Incoming message from value.

    Returns
    Type Description
    TDist

    The outgoing EP message to the copy argument.

    Type Parameters
    Name Description
    TDist

    The type of the distribution over the variable being copied.

    Remarks

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

    CopyAverageLogarithm(Gaussian, Gaussian)

    VMP message to copy.

    Declaration
    [Quality(QualityBand.Preview)]
    public static TruncatedGaussian CopyAverageLogarithm(Gaussian value, Gaussian to_value)
    Parameters
    Type Name Description
    Gaussian value

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

    Gaussian to_value

    Previous outgoing message to value.

    Returns
    Type Description
    TruncatedGaussian

    The outgoing VMP message to the copy argument.

    Remarks

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

    Exceptions
    Type Condition
    ImproperMessageException

    value is not a proper distribution.

    CopyAverageLogarithm(Gaussian, NonconjugateGaussian, Gaussian)

    VMP message to copy.

    Declaration
    public static NonconjugateGaussian CopyAverageLogarithm(Gaussian value, NonconjugateGaussian copy, Gaussian to_value)
    Parameters
    Type Name Description
    Gaussian value

    Incoming message from value.

    NonconjugateGaussian copy

    Incoming message from copy.

    Gaussian to_value

    Previous outgoing message to value.

    Returns
    Type Description
    NonconjugateGaussian

    The outgoing VMP message to the copy argument.

    Remarks

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

    CopyAverageLogarithm(TruncatedGaussian)

    VMP message to copy.

    Declaration
    [Quality(QualityBand.Preview)]
    public static Gaussian CopyAverageLogarithm(TruncatedGaussian value)
    Parameters
    Type Name Description
    TruncatedGaussian value

    Incoming message from value.

    Returns
    Type Description
    Gaussian

    The outgoing VMP message to the copy argument.

    Remarks

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

    CopyAverageLogarithm<TDist>(TDist)

    VMP message to copy.

    Declaration
    public static TDist CopyAverageLogarithm<TDist>(TDist Value)
        where TDist : IDistribution<T>
    Parameters
    Type Name Description
    TDist Value

    Incoming message from value.

    Returns
    Type Description
    TDist

    The outgoing VMP message to the copy argument.

    Type Parameters
    Name Description
    TDist

    The type of the distribution over the variable being copied.

    Remarks

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

    CopyDeriv<TDist>(TDist)

    Declaration
    public static TDist CopyDeriv<TDist>(TDist result)
        where TDist : IDistribution<T>, SettableToUniform
    Parameters
    Type Name Description
    TDist result
    Returns
    Type Description
    TDist
    Type Parameters
    Name Description
    TDist

    LogAverageFactor(T, T)

    Evidence message for EP.

    Declaration
    public static double LogAverageFactor(T copy, T value)
    Parameters
    Type Name Description
    T copy

    Incoming message from copy.

    T value

    Incoming message from value.

    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_(copy,value) p(copy,value) factor(copy,value)).

    LogAverageFactor<TDist>(TDist, TDist)

    Evidence message for EP.

    Declaration
    public static double LogAverageFactor<TDist>(TDist copy, TDist value)
        where TDist : CanGetLogAverageOf<TDist>
    Parameters
    Type Name Description
    TDist copy

    Incoming message from copy.

    TDist value

    Incoming message from value.

    Returns
    Type Description
    Double

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

    Type Parameters
    Name Description
    TDist

    The type of the distribution over the variable being copied.

    Remarks

    The formula for the result is log(sum_(copy,value) p(copy,value) factor(copy,value)).

    LogAverageFactor<TDist>(TDist, T)

    Evidence message for EP.

    Declaration
    public static double LogAverageFactor<TDist>(TDist copy, T value)
        where TDist : CanGetLogProb<T>
    Parameters
    Type Name Description
    TDist copy

    Incoming message from copy.

    T value

    Incoming message from value.

    Returns
    Type Description
    Double

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

    Type Parameters
    Name Description
    TDist

    The type of the distribution over the variable being copied.

    Remarks

    The formula for the result is log(sum_(copy,value) p(copy,value) factor(copy,value)).

    LogAverageFactor<TDist>(T, TDist)

    Evidence message for EP.

    Declaration
    public static double LogAverageFactor<TDist>(T copy, TDist value)
        where TDist : CanGetLogProb<T>
    Parameters
    Type Name Description
    T copy

    Incoming message from copy.

    TDist value

    Incoming message from value.

    Returns
    Type Description
    Double

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

    Type Parameters
    Name Description
    TDist

    The type of the distribution over the variable being copied.

    Remarks

    The formula for the result is log(sum_(copy,value) p(copy,value) factor(copy,value)).

    LogEvidenceRatio(T, T)

    Evidence message for EP.

    Declaration
    public static double LogEvidenceRatio(T copy, T value)
    Parameters
    Type Name Description
    T copy

    Incoming message from copy.

    T value

    Incoming message from value.

    Returns
    Type Description
    Double

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

    Remarks

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

    LogEvidenceRatio<TDist>(TDist)

    Evidence message for EP.

    Declaration
    public static double LogEvidenceRatio<TDist>(TDist copy)
        where TDist : IDistribution<T>
    Parameters
    Type Name Description
    TDist copy

    Incoming message from copy.

    Returns
    Type Description
    Double

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

    Type Parameters
    Name Description
    TDist

    The type of the distribution over the variable being copied.

    Remarks

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

    LogEvidenceRatio<TDist>(T, TDist)

    Evidence message for EP.

    Declaration
    public static double LogEvidenceRatio<TDist>(T copy, TDist value)
        where TDist : CanGetLogProb<T>
    Parameters
    Type Name Description
    T copy

    Incoming message from copy.

    TDist value

    Incoming message from value.

    Returns
    Type Description
    Double

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

    Type Parameters
    Name Description
    TDist

    The type of the distribution over the variable being copied.

    Remarks

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

    ValueAverageConditional(T)

    EP message to value.

    Declaration
    public static T ValueAverageConditional(T copy)
    Parameters
    Type Name Description
    T copy

    Incoming message from copy.

    Returns
    Type Description
    T

    The outgoing EP message to the value argument.

    Remarks

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

    ValueAverageConditional(Gamma)

    Declaration
    [Quality(QualityBand.Preview)]
    public static TruncatedGamma ValueAverageConditional(Gamma copy)
    Parameters
    Type Name Description
    Gamma copy
    Returns
    Type Description
    TruncatedGamma

    ValueAverageConditional(Gaussian)

    Declaration
    [Quality(QualityBand.Preview)]
    public static TruncatedGaussian ValueAverageConditional(Gaussian copy)
    Parameters
    Type Name Description
    Gaussian copy
    Returns
    Type Description
    TruncatedGaussian

    ValueAverageConditional<TDist>(TDist)

    EP message to value.

    Declaration
    public static TDist ValueAverageConditional<TDist>(TDist copy)
        where TDist : IDistribution<T>
    Parameters
    Type Name Description
    TDist copy

    Incoming message from copy.

    Returns
    Type Description
    TDist

    The outgoing EP message to the value argument.

    Type Parameters
    Name Description
    TDist

    The type of the distribution over the variable being copied.

    Remarks

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

    ValueAverageConditional<TDist>(T, TDist)

    EP message to value.

    Declaration
    public static TDist ValueAverageConditional<TDist>(T copy, TDist result)
        where TDist : IDistribution<T>
    Parameters
    Type Name Description
    T copy

    Incoming message from copy.

    TDist result

    Modified to contain the outgoing message.

    Returns
    Type Description
    TDist

    result

    Type Parameters
    Name Description
    TDist

    The type of the distribution over the variable being copied.

    Remarks

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

    ValueAverageLogarithm(Gaussian)

    VMP message to value.

    Declaration
    [Quality(QualityBand.Preview)]
    public static TruncatedGaussian ValueAverageLogarithm(Gaussian copy)
    Parameters
    Type Name Description
    Gaussian copy

    Incoming message from copy.

    Returns
    Type Description
    TruncatedGaussian

    The outgoing VMP message to the value argument.

    Remarks

    The outgoing message is the factor viewed as a function of value with copy integrated out. The formula is sum_copy p(copy) factor(copy,value).

    ValueAverageLogarithm(NonconjugateGaussian, Gaussian, Gaussian)

    VMP message to value.

    Declaration
    public static Gaussian ValueAverageLogarithm(NonconjugateGaussian copy, Gaussian value, Gaussian to_value)
    Parameters
    Type Name Description
    NonconjugateGaussian copy

    Incoming message from copy.

    Gaussian value

    Incoming message from value.

    Gaussian to_value

    Previous outgoing message to value.

    Returns
    Type Description
    Gaussian

    The outgoing VMP message to the value argument.

    Remarks

    The outgoing message is the factor viewed as a function of value with copy integrated out. The formula is sum_copy p(copy) factor(copy,value).

    ValueAverageLogarithm(TruncatedGaussian, Gaussian, Gaussian)

    VMP message to value.

    Declaration
    [Quality(QualityBand.Preview)]
    public static Gaussian ValueAverageLogarithm(TruncatedGaussian copy, Gaussian value, Gaussian to_value)
    Parameters
    Type Name Description
    TruncatedGaussian copy

    Incoming message from copy.

    Gaussian value

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

    Gaussian to_value

    Previous outgoing message to value.

    Returns
    Type Description
    Gaussian

    The outgoing VMP message to the value argument.

    Remarks

    The outgoing message is the factor viewed as a function of value with copy integrated out. The formula is sum_copy p(copy) factor(copy,value).

    Exceptions
    Type Condition
    ImproperMessageException

    value is not a proper distribution.

    ValueAverageLogarithm<TDist>(TDist)

    VMP message to value.

    Declaration
    public static TDist ValueAverageLogarithm<TDist>(TDist copy)
        where TDist : IDistribution<T>
    Parameters
    Type Name Description
    TDist copy

    Incoming message from copy.

    Returns
    Type Description
    TDist

    The outgoing VMP message to the value argument.

    Type Parameters
    Name Description
    TDist

    The type of the distribution over the variable being copied.

    Remarks

    The outgoing message is the factor viewed as a function of value with copy integrated out. The formula is sum_copy p(copy) factor(copy,value).

    ValueAverageLogarithm<TDist>(T, TDist)

    VMP message to value.

    Declaration
    public static TDist ValueAverageLogarithm<TDist>(T copy, TDist result)
        where TDist : IDistribution<T>
    Parameters
    Type Name Description
    T copy

    Incoming message from copy.

    TDist result

    Modified to contain the outgoing message.

    Returns
    Type Description
    TDist

    result

    Type Parameters
    Name Description
    TDist

    The type of the distribution over the variable being copied.

    Remarks

    The outgoing message is the factor viewed as a function of value with copy integrated out. The formula is sum_copy p(copy) factor(copy,value).

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