Search Results for

    Show / Hide Table of Contents

    Class Replicate2BufferOp

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

    Inheritance
    Object
    Replicate2BufferOp
    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 = false)]
    [Buffers(new string[]{"marginal"})]
    [Quality(QualityBand.Preview)]
    public static class Replicate2BufferOp

    Methods

    DefAverageConditional<T>(T[], T)

    EP message to Def.

    Declaration
    public static T DefAverageConditional<T>([SkipIfAllUniform] T[] Uses, T result)
        where T : SettableToProduct<T>, SettableTo<T>, SettableToUniform
    Parameters
    Type Name Description
    T[] Uses

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

    T result

    Modified to contain the outgoing message.

    Returns
    Type Description
    T

    result

    Type Parameters
    Name Description
    T

    The type of the messages.

    Remarks

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

    Exceptions
    Type Condition
    ImproperMessageException

    Uses is not a proper distribution.

    DefAverageConditional<T>(IReadOnlyList<T>, T)

    Declaration
    public static T DefAverageConditional<T>([SkipIfAllUniform] IReadOnlyList<T> Uses, T result)
        where T : SettableToProduct<T>, SettableTo<T>, SettableToUniform
    Parameters
    Type Name Description
    IReadOnlyList<T> Uses
    T result
    Returns
    Type Description
    T
    Type Parameters
    Name Description
    T

    The type of the messages.

    Marginal<T>(IReadOnlyList<T>, T, T)

    Declaration
    [SkipIfAllUniform]
    public static T Marginal<T>(IReadOnlyList<T> Uses, T Def, T result)
        where T : SettableToProduct<T>, SettableTo<T>
    Parameters
    Type Name Description
    IReadOnlyList<T> Uses
    T Def
    T result
    Returns
    Type Description
    T
    Type Parameters
    Name Description
    T

    The type of the messages.

    MarginalIncrement<T>(T, T, T)

    Declaration
    public static T MarginalIncrement<T>(T result, T use, T def)
        where T : SettableToProduct<T>
    Parameters
    Type Name Description
    T result

    Modified to contain the outgoing message.

    T use
    T def

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

    Returns
    Type Description
    T

    result

    Type Parameters
    Name Description
    T

    The type of the messages.

    Remarks

    Exceptions
    Type Condition
    ImproperMessageException

    def is not a proper distribution.

    MarginalInit<T>(T)

    Initialize the buffer marginal.

    Declaration
    public static T MarginalInit<T>(T Def)
        where T : ICloneable
    Parameters
    Type Name Description
    T Def

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

    Returns
    Type Description
    T

    Initial value of buffer marginal.

    Type Parameters
    Name Description
    T

    The type of the messages.

    Remarks

    Exceptions
    Type Condition
    ImproperMessageException

    Def is not a proper distribution.

    UsesAverageConditional<T>(T[], T, T, Int32, T)

    EP message to Uses.

    Declaration
    public static T UsesAverageConditional<T>(T[] Uses, T Def, T marginal, int resultIndex, T result)
        where T : SettableToRatio<T>, SettableToProduct<T>, SettableTo<T>
    Parameters
    Type Name Description
    T[] Uses

    Incoming message from Uses.

    T Def

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

    T marginal

    Buffer marginal.

    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
    T

    The type of the messages.

    Remarks

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

    Exceptions
    Type Condition
    ImproperMessageException

    Def is not a proper distribution.

    UsesAverageConditional<T>(IReadOnlyList<T>, T, T, Int32, T)

    Declaration
    public static T UsesAverageConditional<T>(IReadOnlyList<T> Uses, T Def, T marginal, int resultIndex, T result)
        where T : SettableToRatio<T>, SettableToProduct<T>, SettableTo<T>
    Parameters
    Type Name Description
    IReadOnlyList<T> Uses
    T Def
    T marginal
    Int32 resultIndex
    T result
    Returns
    Type Description
    T
    Type Parameters
    Name Description
    T

    The type of the messages.

    UsesAverageConditionalInit<T, ArrayType>(T, Int32, IArrayFactory<T, ArrayType>)

    Declaration
    public static ArrayType UsesAverageConditionalInit<T, ArrayType>(T Def, int count, IArrayFactory<T, ArrayType> factory)
        where T : ICloneable
    Parameters
    Type Name Description
    T Def

    Incoming message from Def.

    Int32 count

    Constant value for Count.

    IArrayFactory<T, ArrayType> factory
    Returns
    Type Description
    ArrayType
    Type Parameters
    Name Description
    T

    The type of the messages.

    ArrayType

    The type of arrays produced by factory.

    Remarks

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