Class PowerOp
Provides outgoing messages for Pow(Double, Double), given random arguments to the function.
Inherited Members
Namespace: Microsoft.ML.Probabilistic.Factors
Assembly: Microsoft.ML.Probabilistic.dll
Syntax
[FactorMethod(typeof(Math), "Pow", new Type[]{typeof(double), typeof(double)})]
[Quality(QualityBand.Experimental)]
public static class PowerOp
Methods
FromMeanPowerAndMeanLog(Double, Double, Double)
Declaration
public static Gamma FromMeanPowerAndMeanLog(double meanPower, double meanLog, double power)
Parameters
Type | Name | Description |
---|---|---|
Double | meanPower | |
Double | meanLog | |
Double | power |
Returns
Type | Description |
---|---|
Gamma |
GammaFromGammaPower(GammaPower)
Declaration
public static Gamma GammaFromGammaPower(GammaPower message)
Parameters
Type | Name | Description |
---|---|---|
GammaPower | message |
Returns
Type | Description |
---|---|
Gamma |
GammaFromMeanAndMeanInverse(Double, Double)
Declaration
public static Gamma GammaFromMeanAndMeanInverse(double mean, double meanInverse)
Parameters
Type | Name | Description |
---|---|---|
Double | mean | |
Double | meanInverse |
Returns
Type | Description |
---|---|
Gamma |
GammaPowerFromDifferentPower(GammaPower, Double)
Declaration
public static GammaPower GammaPowerFromDifferentPower(GammaPower message, double newPower)
Parameters
Type | Name | Description |
---|---|---|
GammaPower | message | |
Double | newPower |
Returns
Type | Description |
---|---|
GammaPower |
LogAverageFactor(GammaPower, GammaPower, Double)
Evidence message for EP.
Declaration
public static double LogAverageFactor(GammaPower pow, GammaPower x, double y)
Parameters
Type | Name | Description |
---|---|---|
GammaPower | pow | Incoming message from |
GammaPower | x | Incoming message from |
Double | y | 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_(pow,x) p(pow,x) factor(pow,x,y))
.
PowAverageConditional(Gamma, Double)
EP message to pow
.
Declaration
public static GammaPower PowAverageConditional(Gamma x, double y)
Parameters
Type | Name | Description |
---|---|---|
Gamma | x | Incoming message from |
Double | y | Constant value for |
Returns
Type | Description |
---|---|
GammaPower | The outgoing EP message to the |
Remarks
The outgoing message is a distribution matching the moments of pow
as the random arguments are varied. The formula is proj[p(pow) sum_(x) p(x) factor(pow,x,y)]/p(pow)
.
Exceptions
Type | Condition |
---|---|
ImproperMessageException |
|
PowAverageConditional(Gamma, Double, Gamma)
EP message to pow
.
Declaration
public static Gamma PowAverageConditional(Gamma x, double y, Gamma result)
Parameters
Type | Name | Description |
---|---|---|
Gamma | x | Incoming message from |
Double | y | Constant value for |
Gamma | result | Modified to contain the outgoing message. |
Returns
Type | Description |
---|---|
Gamma |
|
Remarks
The outgoing message is a distribution matching the moments of pow
as the random arguments are varied. The formula is proj[p(pow) sum_(x) p(x) factor(pow,x,y)]/p(pow)
.
Exceptions
Type | Condition |
---|---|
ImproperMessageException |
|
PowAverageConditional(GammaPower, Double, GammaPower)
EP message to pow
.
Declaration
public static GammaPower PowAverageConditional(GammaPower x, double y, GammaPower result)
Parameters
Type | Name | Description |
---|---|---|
GammaPower | x | Incoming message from |
Double | y | Constant value for |
GammaPower | result | Modified to contain the outgoing message. |
Returns
Type | Description |
---|---|
GammaPower |
|
Remarks
The outgoing message is a distribution matching the moments of pow
as the random arguments are varied. The formula is proj[p(pow) sum_(x) p(x) factor(pow,x,y)]/p(pow)
.
Exceptions
Type | Condition |
---|---|
ImproperMessageException |
|
PowAverageConditional(Pareto, Double)
EP message to pow
.
Declaration
public static Pareto PowAverageConditional(Pareto x, double y)
Parameters
Type | Name | Description |
---|---|---|
Pareto | x | Incoming message from |
Double | y | Constant value for |
Returns
Type | Description |
---|---|
Pareto | The outgoing EP message to the |
Remarks
The outgoing message is a distribution matching the moments of pow
as the random arguments are varied. The formula is proj[p(pow) sum_(x) p(x) factor(pow,x,y)]/p(pow)
.
PowAverageConditional(TruncatedGamma, Double)
EP message to pow
.
Declaration
public static Gamma PowAverageConditional(TruncatedGamma x, double y)
Parameters
Type | Name | Description |
---|---|---|
TruncatedGamma | x | Incoming message from |
Double | y | Constant value for |
Returns
Type | Description |
---|---|
Gamma | The outgoing EP message to the |
Remarks
The outgoing message is a distribution matching the moments of pow
as the random arguments are varied. The formula is proj[p(pow) sum_(x) p(x) factor(pow,x,y)]/p(pow)
.
Exceptions
Type | Condition |
---|---|
ImproperMessageException |
|
PowAverageConditional(TruncatedGamma, Double, GammaPower)
Declaration
public static GammaPower PowAverageConditional(TruncatedGamma x, double y, GammaPower result)
Parameters
Type | Name | Description |
---|---|---|
TruncatedGamma | x | |
Double | y | |
GammaPower | result |
Returns
Type | Description |
---|---|
GammaPower |
PowAverageLogarithm(Gamma, Double)
VMP message to pow
.
Declaration
public static GammaPower PowAverageLogarithm(Gamma x, double y)
Parameters
Type | Name | Description |
---|---|---|
Gamma | x | Incoming message from |
Double | y | Constant value for |
Returns
Type | Description |
---|---|
GammaPower | The outgoing VMP message to the |
Remarks
The outgoing message is a distribution matching the moments of pow
as the random arguments are varied. The formula is proj[sum_(x) p(x) factor(pow,x,y)]
.
Exceptions
Type | Condition |
---|---|
ImproperMessageException |
|
PowAverageLogarithm(GammaPower, Double, GammaPower)
VMP message to pow
.
Declaration
public static GammaPower PowAverageLogarithm(GammaPower x, double y, GammaPower result)
Parameters
Type | Name | Description |
---|---|---|
GammaPower | x | Incoming message from |
Double | y | Constant value for |
GammaPower | result | Modified to contain the outgoing message. |
Returns
Type | Description |
---|---|
GammaPower |
|
Remarks
The outgoing message is a distribution matching the moments of pow
as the random arguments are varied. The formula is proj[sum_(x) p(x) factor(pow,x,y)]
.
Exceptions
Type | Condition |
---|---|
ImproperMessageException |
|
XAverageConditional(Gamma, Gamma, Double, Gamma)
EP message to x
.
Declaration
public static Gamma XAverageConditional(Gamma pow, Gamma x, double y, Gamma result)
Parameters
Type | Name | Description |
---|---|---|
Gamma | pow | Incoming message from |
Gamma | x | Incoming message from |
Double | y | Constant value for |
Gamma | result | Modified to contain the outgoing message. |
Returns
Type | Description |
---|---|
Gamma |
|
Remarks
The outgoing message is a distribution matching the moments of x
as the random arguments are varied. The formula is proj[p(x) sum_(pow) p(pow) factor(pow,x,y)]/p(x)
.
Exceptions
Type | Condition |
---|---|
ImproperMessageException |
|
XAverageConditional(Gamma, TruncatedGamma, Double)
Declaration
public static TruncatedGamma XAverageConditional(Gamma pow, TruncatedGamma x, double y)
Parameters
Type | Name | Description |
---|---|---|
Gamma | pow | |
TruncatedGamma | x | |
Double | y |
Returns
Type | Description |
---|---|
TruncatedGamma |
XAverageConditional(GammaPower, GammaPower, Double, GammaPower)
EP message to x
.
Declaration
public static GammaPower XAverageConditional(GammaPower pow, GammaPower x, double y, GammaPower result)
Parameters
Type | Name | Description |
---|---|---|
GammaPower | pow | Incoming message from |
GammaPower | x | Incoming message from |
Double | y | Constant value for |
GammaPower | result | Modified to contain the outgoing message. |
Returns
Type | Description |
---|---|
GammaPower |
|
Remarks
The outgoing message is a distribution matching the moments of x
as the random arguments are varied. The formula is proj[p(x) sum_(pow) p(pow) factor(pow,x,y)]/p(x)
.
Exceptions
Type | Condition |
---|---|
ImproperMessageException |
|
XAverageConditional(GammaPower, TruncatedGamma, Double)
EP message to x
.
Declaration
public static TruncatedGamma XAverageConditional(GammaPower pow, TruncatedGamma x, double y)
Parameters
Type | Name | Description |
---|---|---|
GammaPower | pow | Incoming message from |
TruncatedGamma | x | Incoming message from |
Double | y | Constant value for |
Returns
Type | Description |
---|---|
TruncatedGamma | The outgoing EP message to the |
Remarks
The outgoing message is a distribution matching the moments of x
as the random arguments are varied. The formula is proj[p(x) sum_(pow) p(pow) factor(pow,x,y)]/p(x)
.
Exceptions
Type | Condition |
---|---|
ImproperMessageException |
|
XAverageConditional(GammaPower, Double)
EP message to x
.
Declaration
public static Gamma XAverageConditional(GammaPower pow, double y)
Parameters
Type | Name | Description |
---|---|---|
GammaPower | pow | Incoming message from |
Double | y | Constant value for |
Returns
Type | Description |
---|---|
Gamma | The outgoing EP message to the |
Remarks
The outgoing message is a distribution matching the moments of x
as the random arguments are varied. The formula is proj[p(x) sum_(pow) p(pow) factor(pow,x,y)]/p(x)
.
Exceptions
Type | Condition |
---|---|
ImproperMessageException |
|
XAverageConditional(Pareto, Gamma, Double)
EP message to x
.
Declaration
public static Gamma XAverageConditional(Pareto pow, Gamma x, double y)
Parameters
Type | Name | Description |
---|---|---|
Pareto | pow | Incoming message from |
Gamma | x | Incoming message from |
Double | y | Constant value for |
Returns
Type | Description |
---|---|
Gamma | The outgoing EP message to the |
Remarks
The outgoing message is a distribution matching the moments of x
as the random arguments are varied. The formula is proj[p(x) sum_(pow) p(pow) factor(pow,x,y)]/p(x)
.
XAverageLogarithm(GammaPower, GammaPower, Double, GammaPower)
VMP message to x
.
Declaration
public static GammaPower XAverageLogarithm(GammaPower pow, GammaPower x, double y, GammaPower result)
Parameters
Type | Name | Description |
---|---|---|
GammaPower | pow | Incoming message from |
GammaPower | x | Incoming message from |
Double | y | Constant value for |
GammaPower | result | Modified to contain the outgoing message. |
Returns
Type | Description |
---|---|
GammaPower |
|
Remarks
The outgoing message is the factor viewed as a function of x
with pow
integrated out. The formula is sum_pow p(pow) factor(pow,x,y)
.
Exceptions
Type | Condition |
---|---|
ImproperMessageException |
|
XAverageLogarithm(GammaPower, Double)
VMP message to x
.
Declaration
public static Gamma XAverageLogarithm(GammaPower pow, double y)
Parameters
Type | Name | Description |
---|---|---|
GammaPower | pow | Incoming message from |
Double | y | Constant value for |
Returns
Type | Description |
---|---|
Gamma | The outgoing VMP message to the |
Remarks
The outgoing message is the factor viewed as a function of x
with pow
integrated out. The formula is sum_pow p(pow) factor(pow,x,y)
.
Exceptions
Type | Condition |
---|---|
ImproperMessageException |
|