Search Results for

    Show / Hide Table of Contents

    Class ReplicateGibbsOp<T>

    Provides outgoing messages for the following factors:

    • Replicate<T>(T, Int32)
    • ReplicateWithMarginal<T>(T, Int32, out T)
    , given random arguments to the function.

    Inheritance
    Object
    ReplicateGibbsOp<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), "Replicate<>", new Type[]{}, Default = true)]
    [FactorMethod(typeof(Clone), "ReplicateWithMarginal<>", new Type[]{}, Default = true)]
    [Quality(QualityBand.Mature)]
    public static class ReplicateGibbsOp<T>
    Type Parameters
    Name Description
    T

    The type of the variable being replicated.

    Methods

    DefGibbs<TDist>(TDist[], TDist)

    Declaration
    public static TDist DefGibbs<TDist>([SkipIfAllUniform] TDist[] Uses, TDist result)
        where TDist : IDistribution<T>, Sampleable<T>, SettableToProduct<TDist>, SettableTo<TDist>
    Parameters
    Type Name Description
    TDist[] Uses

    Incoming message from Uses. Must be a proper distribution. If all elements are uniform, the result will be uniform.

    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 replicated variable.

    Remarks

    Exceptions
    Type Condition
    ImproperMessageException

    Uses is not a proper distribution.

    DefGibbs<TDist>(GibbsMarginal<TDist, T>, T)

    Declaration
    public static T DefGibbs<TDist>(GibbsMarginal<TDist, T> to_marginal, T result)
        where TDist : IDistribution<T>, Sampleable<T>
    Parameters
    Type Name Description
    GibbsMarginal<TDist, T> to_marginal
    T result

    Modified to contain the outgoing message.

    Returns
    Type Description
    T

    result

    Type Parameters
    Name Description
    TDist

    The type of the distribution over the replicated variable.

    Remarks

    DefGibbs<TDist>(IReadOnlyList<TDist>, TDist)

    Declaration
    public static TDist DefGibbs<TDist>([SkipIfAllUniform] IReadOnlyList<TDist> Uses, TDist result)
        where TDist : IDistribution<T>, Sampleable<T>, SettableTo<TDist>, SettableToProduct<TDist>, SettableToRatio<TDist>
    Parameters
    Type Name Description
    IReadOnlyList<TDist> Uses
    TDist result
    Returns
    Type Description
    TDist
    Type Parameters
    Name Description
    TDist

    The type of the distribution over the replicated variable.

    GibbsEvidence<TDist>(IList<TDist>, T)

    Declaration
    public static double GibbsEvidence<TDist>(IList<TDist> Uses, T Def)
        where TDist : IDistribution<T>
    Parameters
    Type Name Description
    IList<TDist> Uses

    Incoming message from Uses.

    T Def

    Incoming message from Def.

    Returns
    Type Description
    Double
    Type Parameters
    Name Description
    TDist

    The type of the distribution over the replicated variable.

    Remarks

    LogEvidenceRatio<TDist>(IList<TDist>, T)

    Evidence message for EP.

    Declaration
    public static double LogEvidenceRatio<TDist>([SkipIfAllUniform] IList<TDist> Uses, T Def)
        where TDist : IDistribution<T>
    Parameters
    Type Name Description
    IList<TDist> Uses

    Incoming message from Uses. Must be a proper distribution. If all elements are uniform, the result will be uniform.

    T Def

    Incoming message from Def.

    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 replicated variable.

    Remarks

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

    Exceptions
    Type Condition
    ImproperMessageException

    Uses is not a proper distribution.

    MarginalGibbs<TDist>(IReadOnlyList<TDist>, TDist, GibbsMarginal<TDist, T>)

    Declaration
    [SkipIfAllUniform]
    public static GibbsMarginal<TDist, T> MarginalGibbs<TDist>(IReadOnlyList<TDist> Uses, TDist Def, GibbsMarginal<TDist, T> to_marginal)
        where TDist : IDistribution<T>, SettableToProduct<TDist>, SettableToRatio<TDist>, SettableTo<TDist>, Sampleable<T>
    Parameters
    Type Name Description
    IReadOnlyList<TDist> Uses
    TDist Def
    GibbsMarginal<TDist, T> to_marginal
    Returns
    Type Description
    GibbsMarginal<TDist, T>
    Type Parameters
    Name Description
    TDist

    The type of the distribution over the replicated variable.

    MarginalGibbs<TDist, TDomain>(TDomain, GibbsMarginal<TDist, TDomain>)

    Declaration
    public static GibbsMarginal<TDist, TDomain> MarginalGibbs<TDist, TDomain>(TDomain Def, GibbsMarginal<TDist, TDomain> to_marginal)
        where TDist : IDistribution<TDomain>, Sampleable<TDomain>
    Parameters
    Type Name Description
    TDomain Def
    GibbsMarginal<TDist, TDomain> to_marginal
    Returns
    Type Description
    GibbsMarginal<TDist, TDomain>
    Type Parameters
    Name Description
    TDist

    The type of the distribution over the replicated variable.

    TDomain

    The domain type of TDist.

    MarginalGibbs2<TDist>(T[], GibbsMarginal<TDist, T>)

    Declaration
    public static GibbsMarginal<TDist, T> MarginalGibbs2<TDist>(T[] Uses, GibbsMarginal<TDist, T> to_marginal)
        where TDist : IDistribution<T>, Sampleable<T>
    Parameters
    Type Name Description
    T[] Uses
    GibbsMarginal<TDist, T> to_marginal
    Returns
    Type Description
    GibbsMarginal<TDist, T>
    Type Parameters
    Name Description
    TDist

    The type of the distribution over the replicated variable.

    MarginalGibbsInit<TDist>(TDist)

    Declaration
    public static GibbsMarginal<TDist, T> MarginalGibbsInit<TDist>(TDist def)
        where TDist : IDistribution<T>, Sampleable<T>
    Parameters
    Type Name Description
    TDist def

    Incoming message from Def.

    Returns
    Type Description
    GibbsMarginal<TDist, T>
    Type Parameters
    Name Description
    TDist

    The type of the distribution over the replicated variable.

    Remarks

    UsesGibbs(T, Int32, T)

    Declaration
    public static T UsesGibbs(T def, int resultIndex, T result)
    Parameters
    Type Name Description
    T def

    Incoming message from Def.

    Int32 resultIndex

    Index of the Uses for which a message is desired.

    T result

    Modified to contain the outgoing message.

    Returns
    Type Description
    T

    result

    Remarks

    UsesGibbs<TDist>(TDist, Int32, TDist)

    Declaration
    public static TDist UsesGibbs<TDist>(TDist def, int resultIndex, TDist result)
        where TDist : IDistribution<T>
    Parameters
    Type Name Description
    TDist def

    Incoming message from Def.

    Int32 resultIndex

    Index of the Uses for which a message is desired.

    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 replicated variable.

    Remarks

    UsesGibbs<TDist>(GibbsMarginal<TDist, T>, TDist, Int32, T)

    Declaration
    public static T UsesGibbs<TDist>(GibbsMarginal<TDist, T> to_marginal, TDist def, int resultIndex, T result)
        where TDist : IDistribution<T>, Sampleable<T>
    Parameters
    Type Name Description
    GibbsMarginal<TDist, T> to_marginal
    TDist def

    Incoming message from Def.

    Int32 resultIndex

    Index of the Uses for which a message is desired.

    T result

    Modified to contain the outgoing message.

    Returns
    Type Description
    T

    result

    Type Parameters
    Name Description
    TDist

    The type of the distribution over the replicated variable.

    Remarks

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