Search Results for

    Show / Hide Table of Contents

    Class GetItemOp<T>

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

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

    The type of an item.

    Methods

    ArrayAverageConditional<Distribution, DistributionArray>(Distribution, Int32, DistributionArray)

    EP message to array.

    Declaration
    public static DistributionArray ArrayAverageConditional<Distribution, DistributionArray>(Distribution item, int index, DistributionArray result)
        where Distribution : SettableTo<Distribution> where DistributionArray : IList<Distribution>
    Parameters
    Type Name Description
    Distribution item

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

    Int32 index

    Constant value for index.

    DistributionArray result

    Modified to contain the outgoing message.

    Returns
    Type Description
    DistributionArray

    result

    Type Parameters
    Name Description
    Distribution

    The type of the distribution over an item.

    DistributionArray

    The type of the outgoing message.

    Remarks

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

    Exceptions
    Type Condition
    ImproperMessageException

    item is not a proper distribution.

    ArrayAverageConditional<Distribution, DistributionArray>(T, Int32, DistributionArray)

    EP message to array.

    Declaration
    public static DistributionArray ArrayAverageConditional<Distribution, DistributionArray>(T item, int index, DistributionArray result)
        where Distribution : HasPoint<T> where DistributionArray : IList<Distribution>
    Parameters
    Type Name Description
    T item

    Incoming message from item.

    Int32 index

    Constant value for index.

    DistributionArray result

    Modified to contain the outgoing message.

    Returns
    Type Description
    DistributionArray

    result

    Type Parameters
    Name Description
    Distribution

    The type of the distribution over an item.

    DistributionArray

    The type of the outgoing message.

    Remarks

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

    ArrayAverageLogarithm<Distribution, DistributionArray>(Distribution, Int32, DistributionArray)

    VMP message to array.

    Declaration
    public static DistributionArray ArrayAverageLogarithm<Distribution, DistributionArray>(Distribution item, int index, DistributionArray result)
        where Distribution : SettableTo<Distribution> where DistributionArray : IList<Distribution>
    Parameters
    Type Name Description
    Distribution item

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

    Int32 index

    Constant value for index.

    DistributionArray result

    Modified to contain the outgoing message.

    Returns
    Type Description
    DistributionArray

    result

    Type Parameters
    Name Description
    Distribution

    The type of the distribution over an item.

    DistributionArray

    The type of the outgoing message.

    Remarks

    The outgoing message is the factor viewed as a function of array with item integrated out. The formula is sum_item p(item) factor(item,array,index).

    Exceptions
    Type Condition
    ImproperMessageException

    item is not a proper distribution.

    ArrayAverageLogarithm<Distribution, DistributionArray>(T, Int32, DistributionArray)

    VMP message to array.

    Declaration
    public static DistributionArray ArrayAverageLogarithm<Distribution, DistributionArray>(T item, int index, DistributionArray result)
        where Distribution : HasPoint<T> where DistributionArray : IList<Distribution>
    Parameters
    Type Name Description
    T item

    Incoming message from item.

    Int32 index

    Constant value for index.

    DistributionArray result

    Modified to contain the outgoing message.

    Returns
    Type Description
    DistributionArray

    result

    Type Parameters
    Name Description
    Distribution

    The type of the distribution over an item.

    DistributionArray

    The type of the outgoing message.

    Remarks

    The outgoing message is the factor viewed as a function of array with item integrated out. The formula is sum_item p(item) factor(item,array,index).

    AverageLogFactor()

    Evidence message for VMP.

    Declaration
    public static double AverageLogFactor()
    Returns
    Type Description
    Double

    Zero.

    Remarks

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

    AverageLogFactor(T, IList<T>, Int32)

    Evidence message for VMP.

    Declaration
    public static double AverageLogFactor(T item, IList<T> array, int index)
    Parameters
    Type Name Description
    T item

    Incoming message from item.

    IList<T> array

    Incoming message from array.

    Int32 index

    Constant value for index.

    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.

    ItemAverageConditional<Distribution>(IList<Distribution>, Int32, Distribution)

    EP message to item.

    Declaration
    public static Distribution ItemAverageConditional<Distribution>([SkipIfAllUniform] IList<Distribution> array, int index, Distribution result)
        where Distribution : SettableTo<Distribution>
    Parameters
    Type Name Description
    IList<Distribution> array

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

    Int32 index

    Constant value for index.

    Distribution result

    Modified to contain the outgoing message.

    Returns
    Type Description
    Distribution

    result

    Type Parameters
    Name Description
    Distribution

    The type of the distribution over an item.

    Remarks

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

    Exceptions
    Type Condition
    ImproperMessageException

    array is not a proper distribution.

    ItemAverageConditionalInit<Distribution>(IList<Distribution>)

    Declaration
    public static Distribution ItemAverageConditionalInit<Distribution>(IList<Distribution> array)
        where Distribution : ICloneable
    Parameters
    Type Name Description
    IList<Distribution> array

    Incoming message from array.

    Returns
    Type Description
    Distribution
    Type Parameters
    Name Description
    Distribution

    The type of the distribution over an item.

    Remarks

    ItemAverageLogarithm<Distribution>(IList<Distribution>, Int32, Distribution)

    VMP message to item.

    Declaration
    public static Distribution ItemAverageLogarithm<Distribution>([SkipIfAllUniform] IList<Distribution> array, int index, Distribution result)
        where Distribution : SettableTo<Distribution>
    Parameters
    Type Name Description
    IList<Distribution> array

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

    Int32 index

    Constant value for index.

    Distribution result

    Modified to contain the outgoing message.

    Returns
    Type Description
    Distribution

    result

    Type Parameters
    Name Description
    Distribution

    The type of the distribution over an item.

    Remarks

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

    Exceptions
    Type Condition
    ImproperMessageException

    array is not a proper distribution.

    ItemAverageLogarithmInit<Distribution>(IList<Distribution>)

    Declaration
    public static Distribution ItemAverageLogarithmInit<Distribution>(IList<Distribution> array)
        where Distribution : ICloneable
    Parameters
    Type Name Description
    IList<Distribution> array

    Incoming message from array.

    Returns
    Type Description
    Distribution
    Type Parameters
    Name Description
    Distribution

    The type of the distribution over an item.

    Remarks

    LogAverageFactor(T, IList<T>, Int32)

    Evidence message for EP.

    Declaration
    public static double LogAverageFactor(T item, IList<T> array, int index)
    Parameters
    Type Name Description
    T item

    Incoming message from item.

    IList<T> array

    Incoming message from array.

    Int32 index

    Constant value for index.

    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_(item,array) p(item,array) factor(item,array,index)).

    LogAverageFactor<Distribution>(Distribution, Distribution)

    Evidence message for EP.

    Declaration
    public static double LogAverageFactor<Distribution>(Distribution item, Distribution to_item)
        where Distribution : CanGetLogAverageOf<Distribution>
    Parameters
    Type Name Description
    Distribution item

    Incoming message from item.

    Distribution to_item

    Outgoing message to item.

    Returns
    Type Description
    Double

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

    Type Parameters
    Name Description
    Distribution

    The type of the distribution over an item.

    Remarks

    The formula for the result is log(sum_(item) p(item) factor(item,array,index)).

    LogAverageFactor<Distribution>(T, IList<Distribution>, Int32)

    Evidence message for EP.

    Declaration
    public static double LogAverageFactor<Distribution>(T item, IList<Distribution> array, int index)
        where Distribution : CanGetLogProb<T>
    Parameters
    Type Name Description
    T item

    Incoming message from item.

    IList<Distribution> array

    Incoming message from array.

    Int32 index

    Constant value for index.

    Returns
    Type Description
    Double

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

    Type Parameters
    Name Description
    Distribution

    The type of the distribution over an item.

    Remarks

    The formula for the result is log(sum_(item,array) p(item,array) factor(item,array,index)).

    LogEvidenceRatio(T, IList<T>, Int32)

    Evidence message for EP.

    Declaration
    public static double LogEvidenceRatio(T item, IList<T> array, int index)
    Parameters
    Type Name Description
    T item

    Incoming message from item.

    IList<T> array

    Incoming message from array.

    Int32 index

    Constant value for index.

    Returns
    Type Description
    Double

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

    Remarks

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

    LogEvidenceRatio<Distribution>(Distribution)

    Evidence message for EP.

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

    Incoming message from item.

    Returns
    Type Description
    Double

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

    Type Parameters
    Name Description
    Distribution

    The type of the distribution over an item.

    Remarks

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

    LogEvidenceRatio<Distribution>(T, IList<Distribution>, Int32)

    Evidence message for EP.

    Declaration
    public static double LogEvidenceRatio<Distribution>(T item, IList<Distribution> array, int index)
        where Distribution : CanGetLogProb<T>
    Parameters
    Type Name Description
    T item

    Incoming message from item.

    IList<Distribution> array

    Incoming message from array.

    Int32 index

    Constant value for index.

    Returns
    Type Description
    Double

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

    Type Parameters
    Name Description
    Distribution

    The type of the distribution over an item.

    Remarks

    The formula for the result is log(sum_(item,array) p(item,array) factor(item,array,index) / sum_item p(item) messageTo(item)). 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.