Class ReplicateExitingOp
Provides outgoing messages for ReplicateExiting<T>(T, Int32), given random arguments to the function.
Inherited Members
Namespace: Microsoft.ML.Probabilistic.Factors
Assembly: Microsoft.ML.Probabilistic.dll
Syntax
[FactorMethod(typeof(Gate), "ReplicateExiting<>", new Type[]{})]
[Quality(QualityBand.Mature)]
public static class ReplicateExitingOp
Remarks
This factor is like Replicate<T>(T, Int32) except Uses[0]
plays the role of Def
,
and Def
is considered a Use
. Needed only when a variable exits a gate in VMP.
Methods
AverageLogFactor()
Evidence message for VMP.
Declaration
public static double AverageLogFactor()
Returns
Type | Description |
---|---|
Double | Zero. |
Remarks
The formula for the result is log(factor(Uses,Def,count))
. Adding up these values across all factors and variables gives the log-evidence estimate for VMP.
DefAverageLogarithm<T>(IList<T>, T)
VMP message to Def
.
Declaration
public static T DefAverageLogarithm<T>([SkipIfAllUniform] IList<T> Uses, T result)
where T : SettableTo<T>
Parameters
Type | Name | Description |
---|---|---|
IList<T> | Uses | Incoming message from |
T | result | Modified to contain the outgoing message. |
Returns
Type | Description |
---|---|
T |
|
Type Parameters
Name | Description |
---|---|
T | The type of the messages. |
Remarks
The outgoing message is the factor viewed as a function of Def
with Uses
integrated out. The formula is sum_Uses p(Uses) factor(Uses,Def,count)
.
Exceptions
Type | Condition |
---|---|
ImproperMessageException |
|
UsesAverageLogarithm<T>(IReadOnlyList<T>, T, Int32, T)
Declaration
[SkipIfAllUniform]
public static T UsesAverageLogarithm<T>(IReadOnlyList<T> Uses, T Def, int resultIndex, T result)
where T : SettableTo<T>, SettableToProduct<T>
Parameters
Type | Name | Description |
---|---|---|
IReadOnlyList<T> | Uses | |
T | Def | |
Int32 | resultIndex | |
T | result |
Returns
Type | Description |
---|---|
T |
Type Parameters
Name | Description |
---|---|
T | The type of the messages. |
UsesAverageLogarithmInit<T>(T, Int32)
Declaration
public static T UsesAverageLogarithmInit<T>(T Def, int resultIndex)
where T : ICloneable
Parameters
Type | Name | Description |
---|---|---|
T | Def | Incoming message from |
Int32 | resultIndex | Index of the |
Returns
Type | Description |
---|---|
T |
Type Parameters
Name | Description |
---|---|
T | The type of the messages. |
Remarks