Class DirichletFromPseudoCountsOp
Provides outgoing messages for SampleFromPseudoCounts(Vector), given random arguments to the function.
Inherited Members
Namespace: Microsoft.ML.Probabilistic.Factors
Assembly: Microsoft.ML.Probabilistic.dll
Syntax
[FactorMethod(new string[]{"sample", "pseudoCounts"}, typeof(Dirichlet), "SampleFromPseudoCounts", new Type[]{})]
[Quality(QualityBand.Stable)]
public static class DirichletFromPseudoCountsOp
Methods
AverageLogFactor(Dirichlet, Vector, Dirichlet)
Evidence message for VMP.
Declaration
public static double AverageLogFactor(Dirichlet sample, Vector pseudoCounts, Dirichlet to_sample)
Parameters
Type | Name | Description |
---|---|---|
Dirichlet | sample | Incoming message from |
Vector | pseudoCounts | Constant value for |
Dirichlet | to_sample | Outgoing message to |
Returns
Type | Description |
---|---|
Double | Average of the factor's log-value across the given argument distributions. |
Remarks
The formula for the result is sum_(sampleFromPseudoCounts) p(sampleFromPseudoCounts) log(factor(sampleFromPseudoCounts,pseudoCount))
. Adding up these values across all factors and variables gives the log-evidence estimate for VMP.
AverageLogFactor(Vector, Vector)
Evidence message for VMP.
Declaration
public static double AverageLogFactor(Vector sample, Vector pseudoCounts)
Parameters
Type | Name | Description |
---|---|---|
Vector | sample | Constant value for |
Vector | pseudoCounts | Constant value for |
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(sampleFromPseudoCounts,pseudoCount))
. Adding up these values across all factors and variables gives the log-evidence estimate for VMP.
LogAverageFactor(Dirichlet, Vector, Dirichlet)
Evidence message for EP.
Declaration
public static double LogAverageFactor(Dirichlet sample, Vector pseudoCounts, Dirichlet to_sample)
Parameters
Type | Name | Description |
---|---|---|
Dirichlet | sample | Incoming message from |
Vector | pseudoCounts | Constant value for |
Dirichlet | to_sample | Outgoing message to |
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_(sampleFromPseudoCounts) p(sampleFromPseudoCounts) factor(sampleFromPseudoCounts,pseudoCount))
.
LogAverageFactor(Vector, Vector)
Evidence message for EP.
Declaration
public static double LogAverageFactor(Vector sample, Vector pseudoCounts)
Parameters
Type | Name | Description |
---|---|---|
Vector | sample | Constant value for |
Vector | pseudoCounts | Constant value for |
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(sampleFromPseudoCounts,pseudoCount))
.
LogEvidenceRatio(Dirichlet, Vector)
Evidence message for EP.
Declaration
public static double LogEvidenceRatio(Dirichlet sample, Vector pseudoCounts)
Parameters
Type | Name | Description |
---|---|---|
Dirichlet | sample | Incoming message from |
Vector | pseudoCounts | Constant value for |
Returns
Type | Description |
---|---|
Double | Logarithm of the factor's contribution the EP model evidence. |
Remarks
The formula for the result is log(sum_(sampleFromPseudoCounts) p(sampleFromPseudoCounts) factor(sampleFromPseudoCounts,pseudoCount) / sum_sampleFromPseudoCounts p(sampleFromPseudoCounts) messageTo(sampleFromPseudoCounts))
. Adding up these values across all factors and variables gives the log-evidence estimate for EP.
LogEvidenceRatio(Vector, Vector)
Evidence message for EP.
Declaration
public static double LogEvidenceRatio(Vector sample, Vector pseudoCounts)
Parameters
Type | Name | Description |
---|---|---|
Vector | sample | Constant value for |
Vector | pseudoCounts | Constant value for |
Returns
Type | Description |
---|---|
Double | Logarithm of the factor's contribution the EP model evidence. |
Remarks
The formula for the result is log(factor(sampleFromPseudoCounts,pseudoCount))
. Adding up these values across all factors and variables gives the log-evidence estimate for EP.
SampleAverageConditional(Vector)
EP message to sampleFromPseudoCounts
.
Declaration
public static Dirichlet SampleAverageConditional(Vector pseudoCounts)
Parameters
Type | Name | Description |
---|---|---|
Vector | pseudoCounts | Constant value for |
Returns
Type | Description |
---|---|
Dirichlet | The outgoing EP message to the |
Remarks
The outgoing message is the factor viewed as a function of sampleFromPseudoCounts
conditioned on the given values.
SampleAverageLogarithm(Vector)
VMP message to sampleFromPseudoCounts
.
Declaration
public static Dirichlet SampleAverageLogarithm(Vector pseudoCounts)
Parameters
Type | Name | Description |
---|---|---|
Vector | pseudoCounts | Constant value for |
Returns
Type | Description |
---|---|
Dirichlet | The outgoing VMP message to the |
Remarks
The outgoing message is the factor viewed as a function of sampleFromPseudoCounts
conditioned on the given values.