Search Results for

    Show / Hide Table of Contents

    Class SparseBernoulliFromBetaOp

    Provides outgoing messages for Sample(ISparseList<Double>), given random arguments to the function.
    Inheritance
    Object
    SparseBernoulliFromBetaOp
    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(SparseBernoulliList), "Sample", new Type[]{typeof(ISparseList<double>)})]
    [Quality(QualityBand.Stable)]
    public class SparseBernoulliFromBetaOp

    Methods

    AverageLogFactor(ISparseList<Boolean>, ISparseList<Double>)

    Evidence message for VMP.

    Declaration
    public static double AverageLogFactor(ISparseList<bool> sample, ISparseList<double> probTrue)
    Parameters
    Type Name Description
    ISparseList<Boolean> sample

    Constant value for sample.

    ISparseList<Double> probTrue

    Constant value for probTrue.

    Returns
    Type Description
    Double

    Average of the factor's log-value across the given argument distributions.

    Remarks

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

    AverageLogFactor(ISparseList<Boolean>, SparseBetaList)

    Evidence message for VMP.

    Declaration
    public static double AverageLogFactor(ISparseList<bool> sample, SparseBetaList probTrue)
    Parameters
    Type Name Description
    ISparseList<Boolean> sample

    Constant value for sample.

    SparseBetaList probTrue

    Incoming message from probTrue. Must be a proper distribution. If any element is uniform, the result will be uniform.

    Returns
    Type Description
    Double

    Average of the factor's log-value across the given argument distributions.

    Remarks

    The formula for the result is sum_(probTrue) p(probTrue) log(factor(sample,probTrue)). Adding up these values across all factors and variables gives the log-evidence estimate for VMP.

    Exceptions
    Type Condition
    ImproperMessageException

    probTrue is not a proper distribution.

    AverageLogFactor(SparseBernoulliList, ISparseList<Double>)

    Evidence message for VMP.

    Declaration
    public static double AverageLogFactor(SparseBernoulliList sample, ISparseList<double> probTrue)
    Parameters
    Type Name Description
    SparseBernoulliList sample

    Incoming message from sample.

    ISparseList<Double> probTrue

    Constant value for probTrue.

    Returns
    Type Description
    Double

    Average of the factor's log-value across the given argument distributions.

    Remarks

    The formula for the result is sum_(sample) p(sample) log(factor(sample,probTrue)). Adding up these values across all factors and variables gives the log-evidence estimate for VMP.

    AverageLogFactor(SparseBernoulliList, SparseBetaList)

    Evidence message for VMP.

    Declaration
    public static double AverageLogFactor(SparseBernoulliList sample, SparseBetaList probTrue)
    Parameters
    Type Name Description
    SparseBernoulliList sample

    Incoming message from sample.

    SparseBetaList probTrue

    Incoming message from probTrue. Must be a proper distribution. If any element is uniform, the result will be uniform.

    Returns
    Type Description
    Double

    Average of the factor's log-value across the given argument distributions.

    Remarks

    The formula for the result is sum_(sample,probTrue) p(sample,probTrue) log(factor(sample,probTrue)). Adding up these values across all factors and variables gives the log-evidence estimate for VMP.

    Exceptions
    Type Condition
    ImproperMessageException

    probTrue is not a proper distribution.

    LogAverageFactor(ISparseList<Boolean>, ISparseList<Double>)

    Evidence message for EP.

    Declaration
    public static double LogAverageFactor(ISparseList<bool> sample, ISparseList<double> probTrue)
    Parameters
    Type Name Description
    ISparseList<Boolean> sample

    Constant value for sample.

    ISparseList<Double> probTrue

    Constant value for probTrue.

    Returns
    Type Description
    Double

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

    Remarks

    The formula for the result is log(factor(sample,probTrue)).

    LogAverageFactor(ISparseList<Boolean>, SparseBetaList)

    Evidence message for EP.

    Declaration
    public static double LogAverageFactor(ISparseList<bool> sample, SparseBetaList probTrue)
    Parameters
    Type Name Description
    ISparseList<Boolean> sample

    Constant value for sample.

    SparseBetaList probTrue

    Incoming message from probTrue.

    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_(probTrue) p(probTrue) factor(sample,probTrue)).

    LogAverageFactor(SparseBernoulliList, SparseBernoulliList)

    Evidence message for EP.

    Declaration
    public static double LogAverageFactor(SparseBernoulliList sample, SparseBernoulliList to_sample)
    Parameters
    Type Name Description
    SparseBernoulliList sample

    Incoming message from sample.

    SparseBernoulliList to_sample

    Outgoing message to sample.

    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_(sample) p(sample) factor(sample,probTrue)).

    LogEvidenceRatio(ISparseList<Boolean>, ISparseList<Double>)

    Evidence message for EP.

    Declaration
    public static double LogEvidenceRatio(ISparseList<bool> sample, ISparseList<double> probTrue)
    Parameters
    Type Name Description
    ISparseList<Boolean> sample

    Constant value for sample.

    ISparseList<Double> probTrue

    Constant value for probTrue.

    Returns
    Type Description
    Double

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

    Remarks

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

    LogEvidenceRatio(ISparseList<Boolean>, SparseBetaList)

    Evidence message for EP.

    Declaration
    public static double LogEvidenceRatio(ISparseList<bool> sample, SparseBetaList probTrue)
    Parameters
    Type Name Description
    ISparseList<Boolean> sample

    Constant value for sample.

    SparseBetaList probTrue

    Incoming message from probTrue.

    Returns
    Type Description
    Double

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

    Remarks

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

    LogEvidenceRatio(SparseBernoulliList, ISparseList<Double>)

    Evidence message for EP.

    Declaration
    public static double LogEvidenceRatio(SparseBernoulliList sample, ISparseList<double> probTrue)
    Parameters
    Type Name Description
    SparseBernoulliList sample

    Incoming message from sample.

    ISparseList<Double> probTrue

    Constant value for probTrue.

    Returns
    Type Description
    Double

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

    Remarks

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

    LogEvidenceRatio(SparseBernoulliList, SparseBetaList)

    Evidence message for EP.

    Declaration
    public static double LogEvidenceRatio(SparseBernoulliList sample, SparseBetaList probTrue)
    Parameters
    Type Name Description
    SparseBernoulliList sample

    Incoming message from sample.

    SparseBetaList probTrue

    Incoming message from probTrue.

    Returns
    Type Description
    Double

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

    Remarks

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

    ProbTrueAverageConditional(ISparseList<Boolean>, SparseBetaList)

    EP message to probTrue.

    Declaration
    public static SparseBetaList ProbTrueAverageConditional(ISparseList<bool> sample, SparseBetaList result)
    Parameters
    Type Name Description
    ISparseList<Boolean> sample

    Constant value for sample.

    SparseBetaList result

    Modified to contain the outgoing message.

    Returns
    Type Description
    SparseBetaList

    result

    Remarks

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

    ProbTrueAverageConditional(SparseBernoulliList, SparseBetaList, SparseBetaList)

    EP message to probTrue.

    Declaration
    public static SparseBetaList ProbTrueAverageConditional(SparseBernoulliList sample, SparseBetaList probTrue, SparseBetaList result)
    Parameters
    Type Name Description
    SparseBernoulliList sample

    Incoming message from sample. Must be a proper distribution. If any element is uniform, the result will be uniform.

    SparseBetaList probTrue

    Incoming message from probTrue.

    SparseBetaList result

    Modified to contain the outgoing message.

    Returns
    Type Description
    SparseBetaList

    result

    Remarks

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

    Exceptions
    Type Condition
    ImproperMessageException

    sample is not a proper distribution.

    ProbTrueAverageLogarithm(ISparseList<Boolean>, SparseBetaList)

    VMP message to probTrue.

    Declaration
    public static SparseBetaList ProbTrueAverageLogarithm(ISparseList<bool> sample, SparseBetaList result)
    Parameters
    Type Name Description
    ISparseList<Boolean> sample

    Constant value for sample.

    SparseBetaList result

    Modified to contain the outgoing message.

    Returns
    Type Description
    SparseBetaList

    result

    Remarks

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

    ProbTrueAverageLogarithm(SparseBernoulliList, SparseBetaList)

    VMP message to probTrue.

    Declaration
    public static SparseBetaList ProbTrueAverageLogarithm(SparseBernoulliList sample, SparseBetaList result)
    Parameters
    Type Name Description
    SparseBernoulliList sample

    Incoming message from sample.

    SparseBetaList result

    Modified to contain the outgoing message.

    Returns
    Type Description
    SparseBetaList

    result

    Remarks

    The outgoing message is the exponential of the average log-factor value, where the average is over all arguments except probTrue. The formula is exp(sum_(sample) p(sample) log(factor(sample,probTrue))).

    ProbTrueConditional(ISparseList<Boolean>, SparseBetaList)

    Gibbs message to probTrue.

    Declaration
    public static SparseBetaList ProbTrueConditional(ISparseList<bool> sample, SparseBetaList result)
    Parameters
    Type Name Description
    ISparseList<Boolean> sample

    Constant value for sample.

    SparseBetaList result

    Modified to contain the outgoing message.

    Returns
    Type Description
    SparseBetaList

    result

    Remarks

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

    SampleAverageConditional(ISparseList<Double>, SparseBernoulliList)

    EP message to sample.

    Declaration
    public static SparseBernoulliList SampleAverageConditional(ISparseList<double> probTrue, SparseBernoulliList result)
    Parameters
    Type Name Description
    ISparseList<Double> probTrue

    Constant value for probTrue.

    SparseBernoulliList result

    Modified to contain the outgoing message.

    Returns
    Type Description
    SparseBernoulliList

    result

    Remarks

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

    SampleAverageConditional(SparseBetaList, SparseBernoulliList)

    EP message to sample.

    Declaration
    public static SparseBernoulliList SampleAverageConditional(SparseBetaList probTrue, SparseBernoulliList result)
    Parameters
    Type Name Description
    SparseBetaList probTrue

    Incoming message from probTrue. Must be a proper distribution. If any element is uniform, the result will be uniform.

    SparseBernoulliList result

    Modified to contain the outgoing message.

    Returns
    Type Description
    SparseBernoulliList

    result

    Remarks

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

    Exceptions
    Type Condition
    ImproperMessageException

    probTrue is not a proper distribution.

    SampleAverageLogarithm(ISparseList<Double>, SparseBernoulliList)

    VMP message to sample.

    Declaration
    public static SparseBernoulliList SampleAverageLogarithm(ISparseList<double> probTrue, SparseBernoulliList result)
    Parameters
    Type Name Description
    ISparseList<Double> probTrue

    Constant value for probTrue.

    SparseBernoulliList result

    Modified to contain the outgoing message.

    Returns
    Type Description
    SparseBernoulliList

    result

    Remarks

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

    SampleAverageLogarithm(SparseBetaList, SparseBernoulliList)

    VMP message to sample.

    Declaration
    public static SparseBernoulliList SampleAverageLogarithm(SparseBetaList probTrue, SparseBernoulliList result)
    Parameters
    Type Name Description
    SparseBetaList probTrue

    Incoming message from probTrue. Must be a proper distribution. If any element is uniform, the result will be uniform.

    SparseBernoulliList result

    Modified to contain the outgoing message.

    Returns
    Type Description
    SparseBernoulliList

    result

    Remarks

    The outgoing message is the exponential of the average log-factor value, where the average is over all arguments except sample. The formula is exp(sum_(probTrue) p(probTrue) log(factor(sample,probTrue))).

    Exceptions
    Type Condition
    ImproperMessageException

    probTrue is not a proper distribution.

    SampleConditional(ISparseList<Double>, SparseBernoulliList)

    Gibbs message to sample.

    Declaration
    public static SparseBernoulliList SampleConditional(ISparseList<double> probTrue, SparseBernoulliList result)
    Parameters
    Type Name Description
    ISparseList<Double> probTrue

    Constant value for probTrue.

    SparseBernoulliList result

    Modified to contain the outgoing message.

    Returns
    Type Description
    SparseBernoulliList

    result

    Remarks

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

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