Class GaussianFromMeanAndVarianceOp
Provides outgoing messages for GaussianFromMeanAndVariance(Double, Double), given random arguments to the function.
Inherited Members
Namespace: Microsoft.ML.Probabilistic.Factors
Assembly: Microsoft.ML.Probabilistic.dll
Syntax
[FactorMethod(typeof(Factor), "GaussianFromMeanAndVariance", new Type[]{})]
[Quality(QualityBand.Stable)]
public static class GaussianFromMeanAndVarianceOp
Fields
ForceProper
Declaration
public static bool ForceProper
Field Value
Type | Description |
---|---|
Boolean |
nWeights
Declaration
public static int nWeights
Field Value
Type | Description |
---|---|
Int32 |
Methods
AverageLogFactor(Gaussian, Gaussian, Double)
Evidence message for VMP.
Declaration
public static double AverageLogFactor(Gaussian sample, Gaussian mean, double variance)
Parameters
Type | Name | Description |
---|---|---|
Gaussian | sample | Incoming message from |
Gaussian | mean | Incoming message from |
Double | variance | Constant value for |
Returns
Type | Description |
---|---|
Double | Average of the factor's log-value across the given argument distributions. |
Remarks
The formula for the result is sum_(sample,mean) p(sample,mean) log(factor(sample,mean,variance))
. Adding up these values across all factors and variables gives the log-evidence estimate for VMP.
Exceptions
Type | Condition |
---|---|
ImproperMessageException |
|
ImproperMessageException |
|
AverageLogFactor(Gaussian, Double, Double)
Evidence message for VMP.
Declaration
public static double AverageLogFactor(Gaussian sample, double mean, double variance)
Parameters
Type | Name | Description |
---|---|---|
Gaussian | sample | Incoming message from |
Double | mean | Constant value for |
Double | variance | Constant value for |
Returns
Type | Description |
---|---|
Double | Average of the factor's log-value across the given argument distributions. |
Remarks
The formula for the result is sum_(sample) p(sample) log(factor(sample,mean,variance))
. Adding up these values across all factors and variables gives the log-evidence estimate for VMP.
Exceptions
Type | Condition |
---|---|
ImproperMessageException |
|
AverageLogFactor(Double, Gaussian, Double)
Evidence message for VMP.
Declaration
public static double AverageLogFactor(double sample, Gaussian mean, double variance)
Parameters
Type | Name | Description |
---|---|---|
Double | sample | Constant value for |
Gaussian | mean | Incoming message from |
Double | variance | Constant value for |
Returns
Type | Description |
---|---|
Double | Average of the factor's log-value across the given argument distributions. |
Remarks
The formula for the result is sum_(mean) p(mean) log(factor(sample,mean,variance))
. Adding up these values across all factors and variables gives the log-evidence estimate for VMP.
Exceptions
Type | Condition |
---|---|
ImproperMessageException |
|
AverageLogFactor(Double, Double, Double)
Evidence message for VMP.
Declaration
public static double AverageLogFactor(double sample, double mean, double variance)
Parameters
Type | Name | Description |
---|---|---|
Double | sample | Constant value for |
Double | mean | Constant value for |
Double | variance | Constant value for |
Returns
Type | Description |
---|---|
Double | Average of the factor's log-value across the given argument distributions. |
Remarks
The formula for the result is log(factor(sample,mean,variance))
. Adding up these values across all factors and variables gives the log-evidence estimate for VMP.
BinomialTransform(Double[])
Declaration
public static void BinomialTransform(double[] x)
Parameters
Type | Name | Description |
---|---|---|
Double[] | x |
InterpolateBesselKMoment(Double, Double[])
Approximate a moment of VG(x;a) by interpolating its values for integer shapes
Declaration
public static double InterpolateBesselKMoment(double a, double[] binomt)
Parameters
Type | Name | Description |
---|---|---|
Double | a | The starting integer shape |
Double[] | binomt | The exact moment for integer shapes starting at |
Returns
Type | Description |
---|---|
Double | The interpolated moment |
LaplacianTimesGaussianMoments(Double, Double, out Double, out Double, out Double)
Compute moments of 0.5*exp(-abs(x))*N(x;m,v)
Declaration
public static void LaplacianTimesGaussianMoments(double m, double v, out double logZ, out double mu, out double vu)
Parameters
Type | Name | Description |
---|---|---|
Double | m | |
Double | v | |
Double | logZ | |
Double | mu | |
Double | vu |
LogAverageFactor(Gaussian, Gaussian, Gamma)
Evidence message for EP.
Declaration
public static double LogAverageFactor(Gaussian sample, Gaussian mean, Gamma variance)
Parameters
Type | Name | Description |
---|---|---|
Gaussian | sample | Incoming message from |
Gaussian | mean | Incoming message from |
Gamma | variance | 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_(sample,mean,variance) p(sample,mean,variance) factor(sample,mean,variance))
.
LogAverageFactor(Gaussian, Gaussian, Double)
Evidence message for EP.
Declaration
public static double LogAverageFactor(Gaussian sample, Gaussian mean, double variance)
Parameters
Type | Name | Description |
---|---|---|
Gaussian | sample | Incoming message from |
Gaussian | mean | Incoming message from |
Double | variance | 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_(sample,mean) p(sample,mean) factor(sample,mean,variance))
.
Exceptions
Type | Condition |
---|---|
ImproperMessageException |
|
ImproperMessageException |
|
LogAverageFactor(Gaussian, Double, Double)
Evidence message for EP.
Declaration
public static double LogAverageFactor(Gaussian sample, double mean, double variance)
Parameters
Type | Name | Description |
---|---|---|
Gaussian | sample | Incoming message from |
Double | mean | Constant value for |
Double | variance | 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_(sample) p(sample) factor(sample,mean,variance))
.
Exceptions
Type | Condition |
---|---|
ImproperMessageException |
|
LogAverageFactor(Double, Gaussian, Double)
Evidence message for EP.
Declaration
public static double LogAverageFactor(double sample, Gaussian mean, double variance)
Parameters
Type | Name | Description |
---|---|---|
Double | sample | Constant value for |
Gaussian | mean | Incoming message from |
Double | variance | 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_(mean) p(mean) factor(sample,mean,variance))
.
Exceptions
Type | Condition |
---|---|
ImproperMessageException |
|
LogAverageFactor(Double, Double, Double)
Evidence message for EP.
Declaration
public static double LogAverageFactor(double sample, double mean, double variance)
Parameters
Type | Name | Description |
---|---|---|
Double | sample | Constant value for |
Double | mean | Constant value for |
Double | variance | 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(sample,mean,variance))
.
LogEvidenceRatio(Gaussian, Gaussian, Gamma, Gaussian)
Evidence message for EP.
Declaration
[Quality(QualityBand.Experimental)]
public static double LogEvidenceRatio(Gaussian sample, Gaussian mean, Gamma variance, Gaussian to_sample)
Parameters
Type | Name | Description |
---|---|---|
Gaussian | sample | Incoming message from |
Gaussian | mean | Incoming message from |
Gamma | variance | Incoming message from |
Gaussian | to_sample | Previous outgoing message to |
Returns
Type | Description |
---|---|
Double | Logarithm of the factor's contribution the EP model evidence. |
Remarks
The formula for the result is log(sum_(sample,mean,variance) p(sample,mean,variance) factor(sample,mean,variance) / sum_sample p(sample) messageTo(sample))
. Adding up these values across all factors and variables gives the log-evidence estimate for EP.
LogEvidenceRatio(Gaussian, Gaussian, Double)
Evidence message for EP.
Declaration
public static double LogEvidenceRatio(Gaussian sample, Gaussian mean, double variance)
Parameters
Type | Name | Description |
---|---|---|
Gaussian | sample | Incoming message from |
Gaussian | mean | Incoming message from |
Double | variance | 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_(sample,mean) p(sample,mean) factor(sample,mean,variance) / sum_sample p(sample) messageTo(sample))
. Adding up these values across all factors and variables gives the log-evidence estimate for EP.
LogEvidenceRatio(Gaussian, Double, Double)
Evidence message for EP.
Declaration
public static double LogEvidenceRatio(Gaussian sample, double mean, double variance)
Parameters
Type | Name | Description |
---|---|---|
Gaussian | sample | Incoming message from |
Double | mean | Constant value for |
Double | variance | 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_(sample) p(sample) factor(sample,mean,variance) / sum_sample p(sample) messageTo(sample))
. Adding up these values across all factors and variables gives the log-evidence estimate for EP.
LogEvidenceRatio(Double, Gaussian, Double)
Evidence message for EP.
Declaration
public static double LogEvidenceRatio(double sample, Gaussian mean, double variance)
Parameters
Type | Name | Description |
---|---|---|
Double | sample | Constant value for |
Gaussian | mean | Incoming message from |
Double | variance | 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_(mean) p(mean) factor(sample,mean,variance))
. Adding up these values across all factors and variables gives the log-evidence estimate for EP.
Exceptions
Type | Condition |
---|---|
ImproperMessageException |
|
LogEvidenceRatio(Double, Double, Double)
Evidence message for EP.
Declaration
public static double LogEvidenceRatio(double sample, double mean, double variance)
Parameters
Type | Name | Description |
---|---|---|
Double | sample | Constant value for |
Double | mean | Constant value for |
Double | variance | 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(sample,mean,variance))
. Adding up these values across all factors and variables gives the log-evidence estimate for EP.
MeanAverageConditional(Gaussian, Gaussian, Gamma)
EP message to mean
.
Declaration
[Quality(QualityBand.Experimental)]
public static Gaussian MeanAverageConditional(Gaussian sample, Gaussian mean, Gamma variance)
Parameters
Type | Name | Description |
---|---|---|
Gaussian | sample | Incoming message from |
Gaussian | mean | Incoming message from |
Gamma | variance | Incoming message from |
Returns
Type | Description |
---|---|
Gaussian | The outgoing EP message to the |
Remarks
The outgoing message is a distribution matching the moments of mean
as the random arguments are varied. The formula is proj[p(mean) sum_(sample,variance) p(sample,variance) factor(sample,mean,variance)]/p(mean)
.
Exceptions
Type | Condition |
---|---|
ImproperMessageException |
|
ImproperMessageException |
|
MeanAverageConditional(Gaussian, Double)
EP message to mean
.
Declaration
public static Gaussian MeanAverageConditional(Gaussian sample, double variance)
Parameters
Type | Name | Description |
---|---|---|
Gaussian | sample | Incoming message from |
Double | variance | Constant value for |
Returns
Type | Description |
---|---|
Gaussian | The outgoing EP message to the |
Remarks
The outgoing message is a distribution matching the moments of mean
as the random arguments are varied. The formula is proj[p(mean) sum_(sample) p(sample) factor(sample,mean,variance)]/p(mean)
.
Exceptions
Type | Condition |
---|---|
ImproperMessageException |
|
MeanAverageConditional(Double, Gaussian, Gamma)
EP message to mean
.
Declaration
[Quality(QualityBand.Experimental)]
public static Gaussian MeanAverageConditional(double sample, Gaussian mean, Gamma variance)
Parameters
Type | Name | Description |
---|---|---|
Double | sample | Constant value for |
Gaussian | mean | Incoming message from |
Gamma | variance | Incoming message from |
Returns
Type | Description |
---|---|
Gaussian | The outgoing EP message to the |
Remarks
The outgoing message is a distribution matching the moments of mean
as the random arguments are varied. The formula is proj[p(mean) sum_(variance) p(variance) factor(sample,mean,variance)]/p(mean)
.
Exceptions
Type | Condition |
---|---|
ImproperMessageException |
|
MeanAverageConditional(Double, Double)
EP message to mean
.
Declaration
public static Gaussian MeanAverageConditional(double sample, double variance)
Parameters
Type | Name | Description |
---|---|---|
Double | sample | Constant value for |
Double | variance | Constant value for |
Returns
Type | Description |
---|---|
Gaussian | The outgoing EP message to the |
Remarks
The outgoing message is the factor viewed as a function of mean
conditioned on the given values.
MeanAverageConditional(Double, Double, TruncatedGaussian)
EP message to mean
.
Declaration
public static TruncatedGaussian MeanAverageConditional(double sample, double variance, TruncatedGaussian result)
Parameters
Type | Name | Description |
---|---|---|
Double | sample | Constant value for |
Double | variance | Constant value for |
TruncatedGaussian | result | Modified to contain the outgoing message. |
Returns
Type | Description |
---|---|
TruncatedGaussian |
|
Remarks
The outgoing message is the factor viewed as a function of mean
conditioned on the given values.
MeanAverageLogarithm(Gaussian, Double)
VMP message to mean
.
Declaration
public static Gaussian MeanAverageLogarithm(Gaussian sample, double variance)
Parameters
Type | Name | Description |
---|---|---|
Gaussian | sample | Incoming message from |
Double | variance | Constant value for |
Returns
Type | Description |
---|---|
Gaussian | The outgoing VMP message to the |
Remarks
The outgoing message is the exponential of the average log-factor value, where the average is over all arguments except mean
. The formula is exp(sum_(sample) p(sample) log(factor(sample,mean,variance)))
.
Exceptions
Type | Condition |
---|---|
ImproperMessageException |
|
MeanAverageLogarithm(Double, Double)
VMP message to mean
.
Declaration
public static Gaussian MeanAverageLogarithm(double sample, double variance)
Parameters
Type | Name | Description |
---|---|---|
Double | sample | Constant value for |
Double | variance | Constant value for |
Returns
Type | Description |
---|---|
Gaussian | The outgoing VMP message to the |
Remarks
The outgoing message is the factor viewed as a function of mean
conditioned on the given values.
NormalCdfMoment(Int32, Double, Double)
Declaration
public static double NormalCdfMoment(int n, double m, double v)
Parameters
Type | Name | Description |
---|---|---|
Int32 | n | |
Double | m | |
Double | v |
Returns
Type | Description |
---|---|
Double |
NormalCdfMomentRatios(Int32, Double, Double)
Computes int_0^Inf x^n N(x;m,v) dx / N(m/sqrt(v);0,1)
Declaration
public static double[] NormalCdfMomentRatios(int nMax, double m, double v)
Parameters
Type | Name | Description |
---|---|---|
Int32 | nMax | |
Double | m | |
Double | v |
Returns
Type | Description |
---|---|
Double[] |
NormalCdfMomentRecurrence(Int32, Double, Double)
Declaration
public static double NormalCdfMomentRecurrence(int n, double m, double v)
Parameters
Type | Name | Description |
---|---|---|
Int32 | n | |
Double | m | |
Double | v |
Returns
Type | Description |
---|---|
Double |
NormalCdfMoments(Int32, Double, Double)
Compute int_0^Inf x^n N(x;m,v) dx for all integer n from 0 to nMax. Loses accuracy if m < -1.
Declaration
public static double[] NormalCdfMoments(int nMax, double m, double v)
Parameters
Type | Name | Description |
---|---|---|
Int32 | nMax | |
Double | m | |
Double | v |
Returns
Type | Description |
---|---|
Double[] |
NormalVGMomentRatio(Int32, Int32, Double, Double)
Declaration
public static double NormalVGMomentRatio(int n, int a, double m, double v)
Parameters
Type | Name | Description |
---|---|---|
Int32 | n | |
Int32 | a | |
Double | m | |
Double | v |
Returns
Type | Description |
---|---|
Double |
NormalVGMomentRatios(Int32, Int32, Double, Double)
Compute int_0^Inf x^n N(x;m+v,v) VG(x;a) dx 2exp(m+v/2)/N(m/sqrt(v);0,1)
Declaration
public static double[][] NormalVGMomentRatios(int nMax, int aMax, double m, double v)
Parameters
Type | Name | Description |
---|---|---|
Int32 | nMax | |
Int32 | aMax | |
Double | m | |
Double | v |
Returns
Type | Description |
---|---|
Double[][] | NormalVGMoment[a][n] where a ranges from 1 to aMax, n ranges from 0 to nMax+aMax-a |
NormalVGMoments(Int32, Int32, Double, Double)
Compute int_0^Inf x^n N(x;m+v,v) VG(x;a) dx 2exp(m+v/2). Loses accuracy if m < -1.
Declaration
public static double[][] NormalVGMoments(int nMax, int aMax, double m, double v)
Parameters
Type | Name | Description |
---|---|---|
Int32 | nMax | |
Int32 | aMax | |
Double | m | |
Double | v |
Returns
Type | Description |
---|---|
Double[][] | NormalVGMoment[a][n] where a ranges from 1 to aMax, n ranges from 0 to nMax+aMax-a |
NormalVGMomentTable(Int32, Int32, Double, Double, Double[])
Declaration
public static double[][] NormalVGMomentTable(int nMax, int aMax, double m, double v, double[] moments1)
Parameters
Type | Name | Description |
---|---|---|
Int32 | nMax | |
Int32 | aMax | |
Double | m | |
Double | v | |
Double[] | moments1 |
Returns
Type | Description |
---|---|
Double[][] |
SampleAverageConditional(Gaussian, Gaussian, Gamma)
EP message to sample
.
Declaration
[Quality(QualityBand.Experimental)]
public static Gaussian SampleAverageConditional(Gaussian sample, Gaussian mean, Gamma variance)
Parameters
Type | Name | Description |
---|---|---|
Gaussian | sample | Incoming message from |
Gaussian | mean | Incoming message from |
Gamma | variance | Incoming message from |
Returns
Type | Description |
---|---|
Gaussian | The outgoing EP message to the |
Remarks
The outgoing message is a distribution matching the moments of sample
as the random arguments are varied. The formula is proj[p(sample) sum_(mean,variance) p(mean,variance) factor(sample,mean,variance)]/p(sample)
.
Exceptions
Type | Condition |
---|---|
ImproperMessageException |
|
ImproperMessageException |
|
SampleAverageConditional(Gaussian, Double)
EP message to sample
.
Declaration
public static Gaussian SampleAverageConditional(Gaussian mean, double variance)
Parameters
Type | Name | Description |
---|---|---|
Gaussian | mean | Incoming message from |
Double | variance | Constant value for |
Returns
Type | Description |
---|---|
Gaussian | The outgoing EP message to the |
Remarks
The outgoing message is a distribution matching the moments of sample
as the random arguments are varied. The formula is proj[p(sample) sum_(mean) p(mean) factor(sample,mean,variance)]/p(sample)
.
Exceptions
Type | Condition |
---|---|
ImproperMessageException |
|
SampleAverageConditional(Gaussian, Double, Gamma)
EP message to sample
.
Declaration
[Quality(QualityBand.Experimental)]
public static Gaussian SampleAverageConditional(Gaussian sample, double mean, Gamma variance)
Parameters
Type | Name | Description |
---|---|---|
Gaussian | sample | Incoming message from |
Double | mean | Constant value for |
Gamma | variance | Incoming message from |
Returns
Type | Description |
---|---|
Gaussian | The outgoing EP message to the |
Remarks
The outgoing message is a distribution matching the moments of sample
as the random arguments are varied. The formula is proj[p(sample) sum_(variance) p(variance) factor(sample,mean,variance)]/p(sample)
.
Exceptions
Type | Condition |
---|---|
ImproperMessageException |
|
SampleAverageConditional(Double, Double)
EP message to sample
.
Declaration
public static Gaussian SampleAverageConditional(double mean, double variance)
Parameters
Type | Name | Description |
---|---|---|
Double | mean | Constant value for |
Double | variance | Constant value for |
Returns
Type | Description |
---|---|
Gaussian | The outgoing EP message to the |
Remarks
The outgoing message is the factor viewed as a function of sample
conditioned on the given values.
SampleAverageConditional(Double, Double, TruncatedGaussian)
EP message to sample
.
Declaration
public static TruncatedGaussian SampleAverageConditional(double mean, double variance, TruncatedGaussian result)
Parameters
Type | Name | Description |
---|---|---|
Double | mean | Constant value for |
Double | variance | Constant value for |
TruncatedGaussian | result | Modified to contain the outgoing message. |
Returns
Type | Description |
---|---|
TruncatedGaussian |
|
Remarks
The outgoing message is the factor viewed as a function of sample
conditioned on the given values.
SampleAverageLogarithm(Gaussian, Double)
VMP message to sample
.
Declaration
public static Gaussian SampleAverageLogarithm(Gaussian mean, double variance)
Parameters
Type | Name | Description |
---|---|---|
Gaussian | mean | Incoming message from |
Double | variance | Constant value for |
Returns
Type | Description |
---|---|
Gaussian | The outgoing VMP message to the |
Remarks
The outgoing message is the exponential of the average log-factor value, where the average is over all arguments except sample
. The formula is exp(sum_(mean) p(mean) log(factor(sample,mean,variance)))
.
Exceptions
Type | Condition |
---|---|
ImproperMessageException |
|
SampleAverageLogarithm(Double, Double)
VMP message to sample
.
Declaration
public static Gaussian SampleAverageLogarithm(double mean, double variance)
Parameters
Type | Name | Description |
---|---|---|
Double | mean | Constant value for |
Double | variance | Constant value for |
Returns
Type | Description |
---|---|
Gaussian | The outgoing VMP message to the |
Remarks
The outgoing message is the factor viewed as a function of sample
conditioned on the given values.
VarianceAverageConditional(Gaussian, Gaussian, Gamma)
EP message to variance
.
Declaration
[Quality(QualityBand.Experimental)]
public static Gamma VarianceAverageConditional(Gaussian sample, Gaussian mean, Gamma variance)
Parameters
Type | Name | Description |
---|---|---|
Gaussian | sample | Incoming message from |
Gaussian | mean | Incoming message from |
Gamma | variance | Incoming message from |
Returns
Type | Description |
---|---|
Gamma | The outgoing EP message to the |
Remarks
The outgoing message is a distribution matching the moments of variance
as the random arguments are varied. The formula is proj[p(variance) sum_(sample,mean) p(sample,mean) factor(sample,mean,variance)]/p(variance)
.
Exceptions
Type | Condition |
---|---|
ImproperMessageException |
|
ImproperMessageException |
|
ImproperMessageException |
|
VarianceAverageConditional(Gaussian, Double, Gamma)
EP message to variance
.
Declaration
[Quality(QualityBand.Experimental)]
public static Gamma VarianceAverageConditional(Gaussian sample, double mean, Gamma variance)
Parameters
Type | Name | Description |
---|---|---|
Gaussian | sample | Incoming message from |
Double | mean | Constant value for |
Gamma | variance | Incoming message from |
Returns
Type | Description |
---|---|
Gamma | The outgoing EP message to the |
Remarks
The outgoing message is a distribution matching the moments of variance
as the random arguments are varied. The formula is proj[p(variance) sum_(sample) p(sample) factor(sample,mean,variance)]/p(variance)
.
Exceptions
Type | Condition |
---|---|
ImproperMessageException |
|
ImproperMessageException |
|
VarianceAverageConditional(Double, Gaussian, Gamma)
EP message to variance
.
Declaration
[Quality(QualityBand.Experimental)]
public static Gamma VarianceAverageConditional(double sample, Gaussian mean, Gamma variance)
Parameters
Type | Name | Description |
---|---|---|
Double | sample | Constant value for |
Gaussian | mean | Incoming message from |
Gamma | variance | Incoming message from |
Returns
Type | Description |
---|---|
Gamma | The outgoing EP message to the |
Remarks
The outgoing message is a distribution matching the moments of variance
as the random arguments are varied. The formula is proj[p(variance) sum_(mean) p(mean) factor(sample,mean,variance)]/p(variance)
.
Exceptions
Type | Condition |
---|---|
ImproperMessageException |
|
ImproperMessageException |
|
VarianceAverageConditional(Double, Double)
EP message to variance
.
Declaration
public static GammaPower VarianceAverageConditional(double sample, double mean)
Parameters
Type | Name | Description |
---|---|---|
Double | sample | Constant value for |
Double | mean | Constant value for |
Returns
Type | Description |
---|---|
GammaPower | The outgoing EP message to the |
Remarks
The outgoing message is the factor viewed as a function of variance
conditioned on the given values.
VarianceAverageConditional(Double, Double, Gamma)
EP message to variance
.
Declaration
[Quality(QualityBand.Experimental)]
public static Gamma VarianceAverageConditional(double sample, double mean, Gamma variance)
Parameters
Type | Name | Description |
---|---|---|
Double | sample | Constant value for |
Double | mean | Constant value for |
Gamma | variance | Incoming message from |
Returns
Type | Description |
---|---|
Gamma | The outgoing EP message to the |
Remarks
The outgoing message is the factor viewed as a function of variance
conditioned on the given values.
Exceptions
Type | Condition |
---|---|
ImproperMessageException |
|
VarianceGammaTimesGaussianIntegral(Double, Double, Double)
Compute int_{-Inf}^{Inf} N(x;m,v) VG(x;a) dx * 2/N(m/sqrt(v);0,1)
Declaration
public static double VarianceGammaTimesGaussianIntegral(double a, double m, double v)
Parameters
Type | Name | Description |
---|---|---|
Double | a | |
Double | m | |
Double | v |
Returns
Type | Description |
---|---|
Double |
VarianceGammaTimesGaussianMoments2(Double, Double, Double, out Double, out Double)
Declaration
public static void VarianceGammaTimesGaussianMoments2(double a, double m, double v, out double mu, out double vu)
Parameters
Type | Name | Description |
---|---|---|
Double | a | |
Double | m | |
Double | v | |
Double | mu | |
Double | vu |
VarianceGammaTimesGaussianMoments3(Double, Double, Double, out Double, out Double)
Declaration
public static void VarianceGammaTimesGaussianMoments3(double a, double m, double v, out double mu, out double vu)
Parameters
Type | Name | Description |
---|---|---|
Double | a | |
Double | m | |
Double | v | |
Double | mu | |
Double | vu |
VarianceGammaTimesGaussianMoments4(Double, Double, Double, out Double, out Double)
Declaration
public static void VarianceGammaTimesGaussianMoments4(double a, double m, double v, out double mu, out double vu)
Parameters
Type | Name | Description |
---|---|---|
Double | a | |
Double | m | |
Double | v | |
Double | mu | |
Double | vu |
VarianceGammaTimesGaussianMoments5(Double, Double, Double, out Double, out Double)
Declaration
public static void VarianceGammaTimesGaussianMoments5(double a, double m, double v, out double mu, out double vu)
Parameters
Type | Name | Description |
---|---|---|
Double | a | |
Double | m | |
Double | v | |
Double | mu | |
Double | vu |