Search Results for

    Show / Hide Table of Contents

    Class CountTrueOp

    Provides outgoing messages for CountTrue(Boolean[]), given random arguments to the function.

    Inheritance
    Object
    CountTrueOp
    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(Factor), "CountTrue", new Type[]{})]
    [Quality(QualityBand.Preview)]
    [Buffers(new string[]{"PoissonBinomialTable"})]
    public static class CountTrueOp

    Methods

    ArrayAverageConditional<TBernoulliArray>(TBernoulliArray, Discrete, Double[,], TBernoulliArray)

    EP message to array.

    Declaration
    public static TBernoulliArray ArrayAverageConditional<TBernoulliArray>(TBernoulliArray array, Discrete count, double[, ] poissonBinomialTable, TBernoulliArray result)
        where TBernoulliArray : IList<Bernoulli>
    Parameters
    Type Name Description
    TBernoulliArray array

    Incoming message from array.

    Discrete count

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

    Double[,] poissonBinomialTable

    Buffer poissonBinomialTable.

    TBernoulliArray result

    Modified to contain the outgoing message.

    Returns
    Type Description
    TBernoulliArray

    result

    Type Parameters
    Name Description
    TBernoulliArray

    The type of messages from/to 'array'.

    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_(count) p(count) factor(count,array)]/p(array).

    Exceptions
    Type Condition
    ImproperMessageException

    count is not a proper distribution.

    ArrayAverageConditional<TBernoulliArray>(TBernoulliArray, Int32, Double[,], TBernoulliArray)

    EP message to array.

    Declaration
    public static TBernoulliArray ArrayAverageConditional<TBernoulliArray>(TBernoulliArray array, int count, double[, ] poissonBinomialTable, TBernoulliArray result)
        where TBernoulliArray : IList<Bernoulli>
    Parameters
    Type Name Description
    TBernoulliArray array

    Incoming message from array.

    Int32 count

    Constant value for count.

    Double[,] poissonBinomialTable

    Buffer poissonBinomialTable.

    TBernoulliArray result

    Modified to contain the outgoing message.

    Returns
    Type Description
    TBernoulliArray

    result

    Type Parameters
    Name Description
    TBernoulliArray

    The type of messages from/to 'array'.

    Remarks

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

    CountAverageConditional(Double[,])

    EP message to count.

    Declaration
    public static Discrete CountAverageConditional(double[, ] poissonBinomialTable)
    Parameters
    Type Name Description
    Double[,] poissonBinomialTable

    Buffer poissonBinomialTable.

    Returns
    Type Description
    Discrete

    The outgoing EP message to the count argument.

    Remarks

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

    LogEvidenceRatio(Discrete)

    Evidence message for EP.

    Declaration
    public static double LogEvidenceRatio(Discrete count)
    Parameters
    Type Name Description
    Discrete count

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

    Returns
    Type Description
    Double

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

    Remarks

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

    Exceptions
    Type Condition
    ImproperMessageException

    count is not a proper distribution.

    LogEvidenceRatio(Int32, Boolean[])

    Evidence message for EP.

    Declaration
    public static double LogEvidenceRatio(int count, bool[] array)
    Parameters
    Type Name Description
    Int32 count

    Constant value for count.

    Boolean[] array

    Constant value for array.

    Returns
    Type Description
    Double

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

    Remarks

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

    LogEvidenceRatio(Int32, Double[,])

    Evidence message for EP.

    Declaration
    public static double LogEvidenceRatio(int count, double[, ] poissonBinomialTable)
    Parameters
    Type Name Description
    Int32 count

    Constant value for count.

    Double[,] poissonBinomialTable

    Buffer poissonBinomialTable.

    Returns
    Type Description
    Double

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

    Remarks

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

    PoissonBinomialTable(IList<Bernoulli>)

    Update the buffer PoissonBinomialTable.

    Declaration
    public static double[, ] PoissonBinomialTable(IList<Bernoulli> array)
    Parameters
    Type Name Description
    IList<Bernoulli> array

    Incoming message from array.

    Returns
    Type Description
    Double[,]

    New value of buffer PoissonBinomialTable.

    Remarks

    PoissonBinomialTableInit(IList<Bernoulli>)

    Initialize the buffer PoissonBinomialTable.

    Declaration
    public static double[, ] PoissonBinomialTableInit(IList<Bernoulli> array)
    Parameters
    Type Name Description
    IList<Bernoulli> array

    Incoming message from array.

    Returns
    Type Description
    Double[,]

    Initial value of buffer PoissonBinomialTable.

    Remarks

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