Class IntegerPlusOp
Provides outgoing messages for the following factors:
, given random arguments to the function.Inherited Members
Namespace: Microsoft.ML.Probabilistic.Factors
Assembly: Microsoft.ML.Probabilistic.dll
Syntax
[FactorMethod(typeof(Factor), "Plus", new Type[]{typeof(int), typeof(int)})]
[FactorMethod(new string[]{"A", "Sum", "B"}, typeof(Factor), "Difference", new Type[]{typeof(int), typeof(int)})]
[Quality(QualityBand.Stable)]
public static class IntegerPlusOp
  Methods
AAverageConditional(Discrete, Discrete, Discrete)
EP message to A.
Declaration
public static Discrete AAverageConditional(Discrete sum, Discrete b, Discrete result)
  Parameters
| Type | Name | Description | 
|---|---|---|
| Discrete | sum | Incoming message from   | 
      
| Discrete | b | Incoming message from   | 
      
| Discrete | result | Modified to contain the outgoing message.  | 
      
Returns
| Type | Description | 
|---|---|
| Discrete | 
  | 
      
Remarks
The outgoing message is a distribution matching the moments of A as the random arguments are varied. The formula is proj[p(A) sum_(Sum,B) p(Sum,B) factor(Sum,A,B)]/p(A).
AAverageConditional(Discrete, Int32, Discrete)
EP message to A.
Declaration
public static Discrete AAverageConditional(Discrete sum, int b, Discrete result)
  Parameters
| Type | Name | Description | 
|---|---|---|
| Discrete | sum | Incoming message from   | 
      
| Int32 | b | Constant value for   | 
      
| Discrete | result | Modified to contain the outgoing message.  | 
      
Returns
| Type | Description | 
|---|---|
| Discrete | 
  | 
      
Remarks
The outgoing message is a distribution matching the moments of A as the random arguments are varied. The formula is proj[p(A) sum_(Sum) p(Sum) factor(Sum,A,B)]/p(A).
AAverageConditional(Poisson, Poisson, Poisson)
EP message to A.
Declaration
public static Poisson AAverageConditional(Poisson sum, Poisson a, Poisson b)
  Parameters
| Type | Name | Description | 
|---|---|---|
| Poisson | sum | Incoming message from   | 
      
| Poisson | a | Incoming message from   | 
      
| Poisson | b | Incoming message from   | 
      
Returns
| Type | Description | 
|---|---|
| Poisson | The outgoing EP message to the   | 
      
Remarks
The outgoing message is a distribution matching the moments of A as the random arguments are varied. The formula is proj[p(A) sum_(Sum,B) p(Sum,B) factor(Sum,A,B)]/p(A).
AAverageConditional(Int32, Discrete, Discrete)
EP message to A.
Declaration
public static Discrete AAverageConditional(int sum, Discrete b, Discrete result)
  Parameters
| Type | Name | Description | 
|---|---|---|
| Int32 | sum | Constant value for   | 
      
| Discrete | b | Incoming message from   | 
      
| Discrete | result | Modified to contain the outgoing message.  | 
      
Returns
| Type | Description | 
|---|---|
| Discrete | 
  | 
      
Remarks
The outgoing message is a distribution matching the moments of A as the random arguments are varied. The formula is proj[p(A) sum_(B) p(B) factor(Sum,A,B)]/p(A).
AAverageConditional(Int32, Poisson, Poisson)
EP message to A.
Declaration
public static Poisson AAverageConditional(int sum, Poisson a, Poisson b)
  Parameters
| Type | Name | Description | 
|---|---|---|
| Int32 | sum | Constant value for   | 
      
| Poisson | a | Incoming message from   | 
      
| Poisson | b | Incoming message from   | 
      
Returns
| Type | Description | 
|---|---|
| Poisson | The outgoing EP message to the   | 
      
Remarks
The outgoing message is a distribution matching the moments of A as the random arguments are varied. The formula is proj[p(A) sum_(B) p(B) factor(Sum,A,B)]/p(A).
AAverageConditional(Int32, Int32, Discrete)
EP message to A.
Declaration
public static Discrete AAverageConditional(int sum, int b, Discrete result)
  Parameters
| Type | Name | Description | 
|---|---|---|
| Int32 | sum | Constant value for   | 
      
| Int32 | b | Constant value for   | 
      
| Discrete | result | Modified to contain the outgoing message.  | 
      
Returns
| Type | Description | 
|---|---|
| Discrete | 
  | 
      
Remarks
The outgoing message is the factor viewed as a function of A conditioned on the given values.
BAverageConditional(Discrete, Discrete, Discrete)
EP message to B.
Declaration
public static Discrete BAverageConditional(Discrete sum, Discrete a, Discrete result)
  Parameters
| Type | Name | Description | 
|---|---|---|
| Discrete | sum | Incoming message from   | 
      
| Discrete | a | Incoming message from   | 
      
| Discrete | result | Modified to contain the outgoing message.  | 
      
Returns
| Type | Description | 
|---|---|
| Discrete | 
  | 
      
Remarks
The outgoing message is a distribution matching the moments of B as the random arguments are varied. The formula is proj[p(B) sum_(Sum,A) p(Sum,A) factor(Sum,A,B)]/p(B).
BAverageConditional(Discrete, Int32, Discrete)
EP message to B.
Declaration
public static Discrete BAverageConditional(Discrete sum, int a, Discrete result)
  Parameters
| Type | Name | Description | 
|---|---|---|
| Discrete | sum | Incoming message from   | 
      
| Int32 | a | Constant value for   | 
      
| Discrete | result | Modified to contain the outgoing message.  | 
      
Returns
| Type | Description | 
|---|---|
| Discrete | 
  | 
      
Remarks
The outgoing message is a distribution matching the moments of B as the random arguments are varied. The formula is proj[p(B) sum_(Sum) p(Sum) factor(Sum,A,B)]/p(B).
BAverageConditional(Poisson, Poisson, Poisson)
EP message to B.
Declaration
public static Poisson BAverageConditional(Poisson sum, Poisson a, Poisson b)
  Parameters
| Type | Name | Description | 
|---|---|---|
| Poisson | sum | Incoming message from   | 
      
| Poisson | a | Incoming message from   | 
      
| Poisson | b | Incoming message from   | 
      
Returns
| Type | Description | 
|---|---|
| Poisson | The outgoing EP message to the   | 
      
Remarks
The outgoing message is a distribution matching the moments of B as the random arguments are varied. The formula is proj[p(B) sum_(Sum,A) p(Sum,A) factor(Sum,A,B)]/p(B).
BAverageConditional(Int32, Discrete, Discrete)
EP message to B.
Declaration
public static Discrete BAverageConditional(int sum, Discrete a, Discrete result)
  Parameters
| Type | Name | Description | 
|---|---|---|
| Int32 | sum | Constant value for   | 
      
| Discrete | a | Incoming message from   | 
      
| Discrete | result | Modified to contain the outgoing message.  | 
      
Returns
| Type | Description | 
|---|---|
| Discrete | 
  | 
      
Remarks
The outgoing message is a distribution matching the moments of B as the random arguments are varied. The formula is proj[p(B) sum_(A) p(A) factor(Sum,A,B)]/p(B).
BAverageConditional(Int32, Poisson, Poisson)
EP message to B.
Declaration
public static Poisson BAverageConditional(int sum, Poisson a, Poisson b)
  Parameters
| Type | Name | Description | 
|---|---|---|
| Int32 | sum | Constant value for   | 
      
| Poisson | a | Incoming message from   | 
      
| Poisson | b | Incoming message from   | 
      
Returns
| Type | Description | 
|---|---|
| Poisson | The outgoing EP message to the   | 
      
Remarks
The outgoing message is a distribution matching the moments of B as the random arguments are varied. The formula is proj[p(B) sum_(A) p(A) factor(Sum,A,B)]/p(B).
BAverageConditional(Int32, Int32, Discrete)
EP message to B.
Declaration
public static Discrete BAverageConditional(int sum, int a, Discrete result)
  Parameters
| Type | Name | Description | 
|---|---|---|
| Int32 | sum | Constant value for   | 
      
| Int32 | a | Constant value for   | 
      
| Discrete | result | Modified to contain the outgoing message.  | 
      
Returns
| Type | Description | 
|---|---|
| Discrete | 
  | 
      
Remarks
The outgoing message is the factor viewed as a function of B conditioned on the given values.
LogAverageFactor(Discrete, Discrete, Discrete)
Evidence message for EP.
Declaration
public static double LogAverageFactor(Discrete sum, Discrete a, Discrete to_sum)
  Parameters
| Type | Name | Description | 
|---|---|---|
| Discrete | sum | Incoming message from   | 
      
| Discrete | a | Incoming message from   | 
      
| Discrete | to_sum | Outgoing message to   | 
      
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_(Sum,A) p(Sum,A) factor(Sum,A,B)).
LogAverageFactor(Discrete, Int32, Discrete, Discrete)
Evidence message for EP.
Declaration
public static double LogAverageFactor(Discrete sum, int a, Discrete b, Discrete to_sum)
  Parameters
| Type | Name | Description | 
|---|---|---|
| Discrete | sum | Incoming message from   | 
      
| Int32 | a | Constant value for   | 
      
| Discrete | b | Incoming message from   | 
      
| Discrete | to_sum | Outgoing message to   | 
      
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_(Sum,B) p(Sum,B) factor(Sum,A,B)).
LogAverageFactor(Discrete, Int32, Int32)
Evidence message for EP.
Declaration
public static double LogAverageFactor(Discrete sum, int a, int b)
  Parameters
| Type | Name | Description | 
|---|---|---|
| Discrete | sum | Incoming message from   | 
      
| Int32 | a | Constant value for   | 
      
| Int32 | b | Constant value for   | 
      
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_(Sum) p(Sum) factor(Sum,A,B)).
LogAverageFactor(Int32, Discrete, Discrete)
Evidence message for EP.
Declaration
public static double LogAverageFactor(int sum, Discrete a, Discrete b)
  Parameters
| Type | Name | Description | 
|---|---|---|
| Int32 | sum | Constant value for   | 
      
| Discrete | a | Incoming message from   | 
      
| Discrete | b | 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_(A,B) p(A,B) factor(Sum,A,B)).
LogAverageFactor(Int32, Discrete, Int32)
Evidence message for EP.
Declaration
public static double LogAverageFactor(int sum, Discrete a, int b)
  Parameters
| Type | Name | Description | 
|---|---|---|
| Int32 | sum | Constant value for   | 
      
| Discrete | a | Incoming message from   | 
      
| Int32 | b | Constant value for   | 
      
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_(A) p(A) factor(Sum,A,B)).
LogAverageFactor(Int32, Int32, Discrete)
Evidence message for EP.
Declaration
public static double LogAverageFactor(int sum, int a, Discrete b)
  Parameters
| Type | Name | Description | 
|---|---|---|
| Int32 | sum | Constant value for   | 
      
| Int32 | a | Constant value for   | 
      
| Discrete | b | 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_(B) p(B) factor(Sum,A,B)).
LogAverageFactor(Int32, Int32, Int32)
Evidence message for EP.
Declaration
public static double LogAverageFactor(int sum, int a, int b)
  Parameters
| Type | Name | Description | 
|---|---|---|
| Int32 | sum | Constant value for   | 
      
| Int32 | a | Constant value for   | 
      
| Int32 | b | Constant value for   | 
      
Returns
| Type | Description | 
|---|---|
| Double | Logarithm of the factor's average value across the given argument distributions.  | 
      
Remarks
The formula for the result is log(factor(Sum,A,B)).
LogEvidenceRatio(Discrete)
Evidence message for EP.
Declaration
public static double LogEvidenceRatio(Discrete sum)
  Parameters
| Type | Name | Description | 
|---|---|---|
| Discrete | sum | 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_(Sum) p(Sum) factor(Sum,A,B) / sum_Sum p(Sum) messageTo(Sum)). Adding up these values across all factors and variables gives the log-evidence estimate for EP.
LogEvidenceRatio(Int32, Discrete, Discrete)
Evidence message for EP.
Declaration
public static double LogEvidenceRatio(int sum, Discrete a, Discrete b)
  Parameters
| Type | Name | Description | 
|---|---|---|
| Int32 | sum | Constant value for   | 
      
| Discrete | a | Incoming message from   | 
      
| Discrete | b | 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_(A,B) p(A,B) factor(Sum,A,B)). Adding up these values across all factors and variables gives the log-evidence estimate for EP.
LogEvidenceRatio(Int32, Discrete, Int32)
Evidence message for EP.
Declaration
public static double LogEvidenceRatio(int sum, Discrete a, int b)
  Parameters
| Type | Name | Description | 
|---|---|---|
| Int32 | sum | Constant value for   | 
      
| Discrete | a | Incoming message from   | 
      
| Int32 | b | 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_(A) p(A) factor(Sum,A,B)). Adding up these values across all factors and variables gives the log-evidence estimate for EP.
LogEvidenceRatio(Int32, Int32, Discrete)
Evidence message for EP.
Declaration
public static double LogEvidenceRatio(int sum, int a, Discrete b)
  Parameters
| Type | Name | Description | 
|---|---|---|
| Int32 | sum | Constant value for   | 
      
| Int32 | a | Constant value for   | 
      
| Discrete | b | 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_(B) p(B) factor(Sum,A,B)). Adding up these values across all factors and variables gives the log-evidence estimate for EP.
LogEvidenceRatio(Int32, Int32, Int32)
Evidence message for EP.
Declaration
public static double LogEvidenceRatio(int sum, int a, int b)
  Parameters
| Type | Name | Description | 
|---|---|---|
| Int32 | sum | Constant value for   | 
      
| Int32 | a | Constant value for   | 
      
| Int32 | b | 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(factor(Sum,A,B)). Adding up these values across all factors and variables gives the log-evidence estimate for EP.
SumAverageConditional(Discrete, Discrete, Discrete)
EP message to Sum.
Declaration
public static Discrete SumAverageConditional(Discrete a, Discrete b, Discrete result)
  Parameters
| Type | Name | Description | 
|---|---|---|
| Discrete | a | Incoming message from   | 
      
| Discrete | b | Incoming message from   | 
      
| Discrete | result | Modified to contain the outgoing message.  | 
      
Returns
| Type | Description | 
|---|---|
| Discrete | 
  | 
      
Remarks
The outgoing message is a distribution matching the moments of Sum as the random arguments are varied. The formula is proj[p(Sum) sum_(A,B) p(A,B) factor(Sum,A,B)]/p(Sum).
SumAverageConditional(Discrete, Int32, Discrete)
EP message to Sum.
Declaration
public static Discrete SumAverageConditional(Discrete a, int b, Discrete result)
  Parameters
| Type | Name | Description | 
|---|---|---|
| Discrete | a | Incoming message from   | 
      
| Int32 | b | Constant value for   | 
      
| Discrete | result | Modified to contain the outgoing message.  | 
      
Returns
| Type | Description | 
|---|---|
| Discrete | 
  | 
      
Remarks
The outgoing message is a distribution matching the moments of Sum as the random arguments are varied. The formula is proj[p(Sum) sum_(A) p(A) factor(Sum,A,B)]/p(Sum).
SumAverageConditional(Poisson, Poisson)
EP message to Sum.
Declaration
public static Poisson SumAverageConditional(Poisson a, Poisson b)
  Parameters
| Type | Name | Description | 
|---|---|---|
| Poisson | a | Incoming message from   | 
      
| Poisson | b | Incoming message from   | 
      
Returns
| Type | Description | 
|---|---|
| Poisson | The outgoing EP message to the   | 
      
Remarks
The outgoing message is a distribution matching the moments of Sum as the random arguments are varied. The formula is proj[p(Sum) sum_(A,B) p(A,B) factor(Sum,A,B)]/p(Sum).
SumAverageConditional(Int32, Discrete, Discrete)
EP message to Sum.
Declaration
public static Discrete SumAverageConditional(int a, Discrete b, Discrete result)
  Parameters
| Type | Name | Description | 
|---|---|---|
| Int32 | a | Constant value for   | 
      
| Discrete | b | Incoming message from   | 
      
| Discrete | result | Modified to contain the outgoing message.  | 
      
Returns
| Type | Description | 
|---|---|
| Discrete | 
  | 
      
Remarks
The outgoing message is a distribution matching the moments of Sum as the random arguments are varied. The formula is proj[p(Sum) sum_(B) p(B) factor(Sum,A,B)]/p(Sum).
SumAverageConditionalInit(Discrete, Discrete)
Declaration
public static Discrete SumAverageConditionalInit(Discrete a, Discrete b)
  Parameters
| Type | Name | Description | 
|---|---|---|
| Discrete | a | Incoming message from   | 
      
| Discrete | b | Incoming message from   | 
      
Returns
| Type | Description | 
|---|---|
| Discrete | 
Remarks
SumAverageConditionalInit(Discrete, Int32)
Declaration
public static Discrete SumAverageConditionalInit(Discrete a, int b)
  Parameters
| Type | Name | Description | 
|---|---|---|
| Discrete | a | Incoming message from   | 
      
| Int32 | b | Constant value for   | 
      
Returns
| Type | Description | 
|---|---|
| Discrete | 
Remarks
SumAverageConditionalInit(Int32, Discrete)
Declaration
public static Discrete SumAverageConditionalInit(int a, Discrete b)
  Parameters
| Type | Name | Description | 
|---|---|---|
| Int32 | a | Constant value for   | 
      
| Discrete | b | Incoming message from   | 
      
Returns
| Type | Description | 
|---|---|
| Discrete | 
Remarks