Class SparseGPOp
Provides outgoing messages for FunctionEvaluate(IFunction, Vector), given random arguments to the function.
Inherited Members
Namespace: Microsoft.ML.Probabilistic.Factors
Assembly: Microsoft.ML.Probabilistic.dll
Syntax
[FactorMethod(typeof(Factor), "FunctionEvaluate", new Type[]{typeof(IFunction), typeof(Vector)})]
[Quality(QualityBand.Preview)]
public static class SparseGPOp
Methods
AverageLogFactor(Double, IFunction, Vector)
Evidence message for VMP.
Declaration
public static double AverageLogFactor(double y, IFunction func, Vector x)
Parameters
| Type | Name | Description |
|---|---|---|
| Double | y | Constant value for |
| IFunction | func | Constant value for |
| Vector | x | Constant value for |
Returns
| Type | Description |
|---|---|
| Double | Zero. |
Remarks
The formula for the result is log(factor(y,func,x)). Adding up these values across all factors and variables gives the log-evidence estimate for VMP.
FuncAverageConditional(Gaussian, SparseGP, Vector, SparseGP)
EP message to func.
Declaration
public static SparseGP FuncAverageConditional(Gaussian y, SparseGP func, Vector x, SparseGP result)
Parameters
| Type | Name | Description |
|---|---|---|
| Gaussian | y | Incoming message from |
| SparseGP | func | Incoming message from |
| Vector | x | Constant value for |
| SparseGP | result | Modified to contain the outgoing message. |
Returns
| Type | Description |
|---|---|
| SparseGP |
|
Remarks
The outgoing message is a distribution matching the moments of func as the random arguments are varied. The formula is proj[p(func) sum_(y) p(y) factor(y,func,x)]/p(func).
Exceptions
| Type | Condition |
|---|---|
| ImproperMessageException |
|
| ImproperMessageException |
|
FuncAverageConditional(Double, SparseGP, Vector, SparseGP)
EP message to func.
Declaration
public static SparseGP FuncAverageConditional(double y, SparseGP func, Vector x, SparseGP result)
Parameters
| Type | Name | Description |
|---|---|---|
| Double | y | Constant value for |
| SparseGP | func | Incoming message from |
| Vector | x | Constant value for |
| SparseGP | result | Modified to contain the outgoing message. |
Returns
| Type | Description |
|---|---|
| SparseGP |
|
Remarks
The outgoing message is the factor viewed as a function of func conditioned on the given values.
Exceptions
| Type | Condition |
|---|---|
| ImproperMessageException |
|
LogAverageFactor(Double, IFunction, Vector)
Evidence message for EP.
Declaration
public static double LogAverageFactor(double y, IFunction func, Vector x)
Parameters
| Type | Name | Description |
|---|---|---|
| Double | y | Constant value for |
| IFunction | func | Constant value for |
| Vector | x | 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(y,func,x)).
LogAverageFactor(Double, SparseGP, Vector)
Evidence message for EP.
Declaration
public static double LogAverageFactor(double y, SparseGP func, Vector x)
Parameters
| Type | Name | Description |
|---|---|---|
| Double | y | Constant value for |
| SparseGP | func | Incoming message from |
| Vector | x | 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_(func) p(func) factor(y,func,x)).
LogEvidenceRatio(Gaussian)
Evidence message for EP.
Declaration
public static double LogEvidenceRatio(Gaussian y)
Parameters
| Type | Name | Description |
|---|---|---|
| Gaussian | y | 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_(y) p(y) factor(y,func,x) / sum_y p(y) messageTo(y)). Adding up these values across all factors and variables gives the log-evidence estimate for EP.
LogEvidenceRatio(Double, IFunction, Vector)
Evidence message for EP.
Declaration
public static double LogEvidenceRatio(double y, IFunction func, Vector x)
Parameters
| Type | Name | Description |
|---|---|---|
| Double | y | Constant value for |
| IFunction | func | Constant value for |
| Vector | x | 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(y,func,x)). Adding up these values across all factors and variables gives the log-evidence estimate for EP.
LogEvidenceRatio(Double, SparseGP, Vector)
Evidence message for EP.
Declaration
public static double LogEvidenceRatio(double y, SparseGP func, Vector x)
Parameters
| Type | Name | Description |
|---|---|---|
| Double | y | Constant value for |
| SparseGP | func | Incoming message from |
| Vector | x | 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_(func) p(func) factor(y,func,x)). Adding up these values across all factors and variables gives the log-evidence estimate for EP.
YAverageConditional(SparseGP, Vector)
EP message to y.
Declaration
public static Gaussian YAverageConditional(SparseGP func, Vector x)
Parameters
| Type | Name | Description |
|---|---|---|
| SparseGP | func | Incoming message from |
| Vector | x | Constant value for |
Returns
| Type | Description |
|---|---|
| Gaussian | The outgoing EP message to the |
Remarks
The outgoing message is a distribution matching the moments of y as the random arguments are varied. The formula is proj[p(y) sum_(func) p(func) factor(y,func,x)]/p(y).
Exceptions
| Type | Condition |
|---|---|
| ImproperMessageException |
|