Class StringFromArrayOp
Provides outgoing messages for StringFromArray(Char[]), given random arguments to the function.
Inherited Members
Namespace: Microsoft.ML.Probabilistic.Factors
Assembly: Microsoft.ML.Probabilistic.dll
Syntax
[FactorMethod(typeof(Factor), "StringFromArray", new Type[]{})]
[Quality(QualityBand.Experimental)]
public static class StringFromArrayOp
Methods
CharactersAverageConditional<TDiscreteCharList>(StringDistribution, IList<DiscreteChar>, TDiscreteCharList)
EP message to characters.
Declaration
public static TDiscreteCharList CharactersAverageConditional<TDiscreteCharList>(StringDistribution str, IList<DiscreteChar> characters, TDiscreteCharList result)
where TDiscreteCharList : IList<DiscreteChar>
Parameters
| Type | Name | Description |
|---|---|---|
| StringDistribution | str | Incoming message from |
| IList<DiscreteChar> | characters | Incoming message from |
| TDiscreteCharList | result | Modified to contain the outgoing message. |
Returns
| Type | Description |
|---|---|
| TDiscreteCharList |
|
Type Parameters
| Name | Description |
|---|---|
| TDiscreteCharList | The type of an outgoing message to |
Remarks
The outgoing message is a distribution matching the moments of characters as the random arguments are varied. The formula is proj[p(characters) sum_(str) p(str) factor(str,characters)]/p(characters).
LogEvidenceRatio(IList<DiscreteChar>, StringDistribution)
Evidence message for EP.
Declaration
public static double LogEvidenceRatio(IList<DiscreteChar> characters, StringDistribution str)
Parameters
| Type | Name | Description |
|---|---|---|
| IList<DiscreteChar> | characters | Incoming message from |
| StringDistribution | str | 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_(characters,str) p(characters,str) factor(str,characters) / sum_str p(str) messageTo(str)). Adding up these values across all factors and variables gives the log-evidence estimate for EP.
LogEvidenceRatio(IList<DiscreteChar>, String)
Evidence message for EP.
Declaration
public static double LogEvidenceRatio(IList<DiscreteChar> characters, string str)
Parameters
| Type | Name | Description |
|---|---|---|
| IList<DiscreteChar> | characters | Incoming message from |
| String | str | 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_(characters) p(characters) factor(str,characters)). Adding up these values across all factors and variables gives the log-evidence estimate for EP.
StrAverageConditional(IList<DiscreteChar>)
EP message to str.
Declaration
public static StringDistribution StrAverageConditional(IList<DiscreteChar> characters)
Parameters
| Type | Name | Description |
|---|---|---|
| IList<DiscreteChar> | characters | Incoming message from |
Returns
| Type | Description |
|---|---|
| StringDistribution | The outgoing EP message to the |
Remarks
The outgoing message is a distribution matching the moments of str as the random arguments are varied. The formula is proj[p(str) sum_(characters) p(characters) factor(str,characters)]/p(str).