Class StringConcatOp
Provides outgoing messages for Concat(String, 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(string), typeof(string)})]
[Quality(QualityBand.Preview)]
public static class StringConcatOp
Methods
ConcatAverageConditional(StringDistribution, StringDistribution)
EP message to concat
.
Declaration
public static StringDistribution ConcatAverageConditional(StringDistribution str1, StringDistribution str2)
Parameters
Type | Name | Description |
---|---|---|
StringDistribution | str1 | Incoming message from |
StringDistribution | str2 | 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_(str1,str2) p(str1,str2) factor(concat,str1,str2)]/p(concat)
.
LogAverageFactor(StringDistribution, StringDistribution, StringDistribution)
Evidence message for EP.
Declaration
public static double LogAverageFactor(StringDistribution concat, StringDistribution str1, StringDistribution str2)
Parameters
Type | Name | Description |
---|---|---|
StringDistribution | concat | Incoming message from |
StringDistribution | str1 | Incoming message from |
StringDistribution | str2 | 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,str1,str2) p(concat,str1,str2) factor(concat,str1,str2))
.
LogEvidenceRatio(StringDistribution, StringDistribution, StringDistribution)
Evidence message for EP.
Declaration
public static double LogEvidenceRatio(StringDistribution concat, StringDistribution str1, StringDistribution str2)
Parameters
Type | Name | Description |
---|---|---|
StringDistribution | concat | Incoming message from |
StringDistribution | str1 | Incoming message from |
StringDistribution | str2 | 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,str1,str2) p(concat,str1,str2) factor(concat,str1,str2) / sum_concat p(concat) messageTo(concat))
. Adding up these values across all factors and variables gives the log-evidence estimate for EP.
LogEvidenceRatio(String, StringDistribution, StringDistribution)
Evidence message for EP.
Declaration
public static double LogEvidenceRatio(string concat, StringDistribution str1, StringDistribution str2)
Parameters
Type | Name | Description |
---|---|---|
String | concat | Constant value for |
StringDistribution | str1 | Incoming message from |
StringDistribution | str2 | 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_(str1,str2) p(str1,str2) factor(concat,str1,str2))
. Adding up these values across all factors and variables gives the log-evidence estimate for EP.
Str1AverageConditional(StringDistribution, StringDistribution)
EP message to str1
.
Declaration
public static StringDistribution Str1AverageConditional(StringDistribution concat, StringDistribution str2)
Parameters
Type | Name | Description |
---|---|---|
StringDistribution | concat | Incoming message from |
StringDistribution | str2 | Incoming message from |
Returns
Type | Description |
---|---|
StringDistribution | The outgoing EP message to the |
Remarks
The outgoing message is a distribution matching the moments of str1
as the random arguments are varied. The formula is proj[p(str1) sum_(concat,str2) p(concat,str2) factor(concat,str1,str2)]/p(str1)
.
Str2AverageConditional(StringDistribution, StringDistribution)
EP message to str2
.
Declaration
public static StringDistribution Str2AverageConditional(StringDistribution concat, StringDistribution str1)
Parameters
Type | Name | Description |
---|---|---|
StringDistribution | concat | Incoming message from |
StringDistribution | str1 | Incoming message from |
Returns
Type | Description |
---|---|
StringDistribution | The outgoing EP message to the |
Remarks
The outgoing message is a distribution matching the moments of str2
as the random arguments are varied. The formula is proj[p(str2) sum_(concat,str1) p(concat,str1) factor(concat,str1,str2)]/p(str2)
.