Class CharFromProbabilitiesOp
Provides outgoing messages for Char(Vector), given random arguments to the function.
Inherited Members
Namespace: Microsoft.ML.Probabilistic.Factors
Assembly: Microsoft.ML.Probabilistic.dll
Syntax
[FactorMethod(typeof(Factor), "Char", new Type[]{})]
[Quality(QualityBand.Experimental)]
public static class CharFromProbabilitiesOp
Methods
CharacterAverageConditional(Dirichlet)
EP message to character
.
Declaration
public static DiscreteChar CharacterAverageConditional(Dirichlet probabilities)
Parameters
Type | Name | Description |
---|---|---|
Dirichlet | probabilities | Incoming message from |
Returns
Type | Description |
---|---|
DiscreteChar | The outgoing EP message to the |
Remarks
The outgoing message is a distribution matching the moments of character
as the random arguments are varied. The formula is proj[p(character) sum_(probabilities) p(probabilities) factor(character,probabilities)]/p(character)
.
Exceptions
Type | Condition |
---|---|
ImproperMessageException |
|
LogEvidenceRatio(Dirichlet, DiscreteChar)
Evidence message for EP.
Declaration
public static double LogEvidenceRatio(Dirichlet probabilities, DiscreteChar character)
Parameters
Type | Name | Description |
---|---|---|
Dirichlet | probabilities | Incoming message from |
DiscreteChar | character | Incoming message from |
Returns
Type | Description |
---|---|
Double | Logarithm of the factor's contribution the EP model evidence. |
Remarks
The formula for the result is log(sum_(probabilities,character) p(probabilities,character) factor(character,probabilities) / sum_character p(character) messageTo(character))
. Adding up these values across all factors and variables gives the log-evidence estimate for EP.
LogEvidenceRatio(Dirichlet, Char)
Evidence message for EP.
Declaration
public static double LogEvidenceRatio(Dirichlet probabilities, char character)
Parameters
Type | Name | Description |
---|---|---|
Dirichlet | probabilities | Incoming message from |
Char | character | 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_(probabilities) p(probabilities) factor(character,probabilities))
. Adding up these values across all factors and variables gives the log-evidence estimate for EP.
ProbabilitiesAverageConditional(DiscreteChar, Dirichlet, Dirichlet)
EP message to probabilities
.
Declaration
public static Dirichlet ProbabilitiesAverageConditional(DiscreteChar character, Dirichlet probabilities, Dirichlet result)
Parameters
Type | Name | Description |
---|---|---|
DiscreteChar | character | Incoming message from |
Dirichlet | probabilities | Incoming message from |
Dirichlet | result | Modified to contain the outgoing message. |
Returns
Type | Description |
---|---|
Dirichlet |
|
Remarks
The outgoing message is a distribution matching the moments of probabilities
as the random arguments are varied. The formula is proj[p(probabilities) sum_(character) p(character) factor(character,probabilities)]/p(probabilities)
.
Exceptions
Type | Condition |
---|---|
ImproperMessageException |
|