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