Class ArrayFromVectorOp
Provides outgoing messages for ArrayFromVector(Vector), given random arguments to the function.
Inherited Members
Namespace: Microsoft.ML.Probabilistic.Factors
Assembly: Microsoft.ML.Probabilistic.dll
Syntax
[FactorMethod(typeof(Factor), "ArrayFromVector", new Type[]{})]
[Quality(QualityBand.Stable)]
public static class ArrayFromVectorOp
Methods
ArrayAverageConditional<GaussianList>(IList<Gaussian>, VectorGaussian, GaussianList)
EP message to array
.
Declaration
public static GaussianList ArrayAverageConditional<GaussianList>(IList<Gaussian> array, VectorGaussian vector, GaussianList result)
where GaussianList : IList<Gaussian>
Parameters
Type | Name | Description |
---|---|---|
IList<Gaussian> | array | Incoming message from |
VectorGaussian | vector | Incoming message from |
GaussianList | result | Modified to contain the outgoing message. |
Returns
Type | Description |
---|---|
GaussianList |
|
Type Parameters
Name | Description |
---|---|
GaussianList | The type of the resulting array. |
Remarks
The outgoing message is a distribution matching the moments of array
as the random arguments are varied. The formula is proj[p(array) sum_(vector) p(vector) factor(array,vector)]/p(array)
.
Exceptions
Type | Condition |
---|---|
ImproperMessageException |
|
ArrayAverageConditional<GaussianList>(IList<Gaussian>, VectorGaussianMoments, GaussianList)
EP message to array
.
Declaration
public static GaussianList ArrayAverageConditional<GaussianList>(IList<Gaussian> array, VectorGaussianMoments vector, GaussianList result)
where GaussianList : IList<Gaussian>
Parameters
Type | Name | Description |
---|---|---|
IList<Gaussian> | array | Incoming message from |
VectorGaussianMoments | vector | Incoming message from |
GaussianList | result | Modified to contain the outgoing message. |
Returns
Type | Description |
---|---|
GaussianList |
|
Type Parameters
Name | Description |
---|---|
GaussianList | The type of the resulting array. |
Remarks
The outgoing message is a distribution matching the moments of array
as the random arguments are varied. The formula is proj[p(array) sum_(vector) p(vector) factor(array,vector)]/p(array)
.
Exceptions
Type | Condition |
---|---|
ImproperMessageException |
|
ArrayAverageConditionalInit(VectorGaussian)
Declaration
public static DistributionStructArray<Gaussian, double> ArrayAverageConditionalInit(VectorGaussian vector)
Parameters
Type | Name | Description |
---|---|---|
VectorGaussian | vector | Incoming message from |
Returns
Type | Description |
---|---|
DistributionStructArray<Gaussian, Double> |
Remarks
ArrayAverageLogarithm<GaussianList>(VectorGaussian, GaussianList)
VMP message to array
.
Declaration
public static GaussianList ArrayAverageLogarithm<GaussianList>(VectorGaussian vector, GaussianList result)
where GaussianList : IList<Gaussian>
Parameters
Type | Name | Description |
---|---|---|
VectorGaussian | vector | Incoming message from |
GaussianList | result | Modified to contain the outgoing message. |
Returns
Type | Description |
---|---|
GaussianList |
|
Type Parameters
Name | Description |
---|---|
GaussianList | The type of the resulting array. |
Remarks
The outgoing message is a distribution matching the moments of array
as the random arguments are varied. The formula is proj[sum_(vector) p(vector) factor(array,vector)]
.
Exceptions
Type | Condition |
---|---|
ImproperMessageException |
|
AverageLogFactor(IList<Gaussian>, VectorGaussian)
Evidence message for VMP.
Declaration
public static double AverageLogFactor(IList<Gaussian> array, VectorGaussian vector)
Parameters
Type | Name | Description |
---|---|---|
IList<Gaussian> | array | Incoming message from |
VectorGaussian | vector | Incoming message from |
Returns
Type | Description |
---|---|
Double | Zero. |
Remarks
In Variational Message Passing, the evidence contribution of a deterministic factor is zero. Adding up these values across all factors and variables gives the log-evidence estimate for VMP.
AverageLogFactor(IList<Gaussian>, VectorGaussianMoments)
Evidence message for VMP.
Declaration
public static double AverageLogFactor(IList<Gaussian> array, VectorGaussianMoments vector)
Parameters
Type | Name | Description |
---|---|---|
IList<Gaussian> | array | Incoming message from |
VectorGaussianMoments | vector | Incoming message from |
Returns
Type | Description |
---|---|
Double | Zero. |
Remarks
In Variational Message Passing, the evidence contribution of a deterministic factor is zero. Adding up these values across all factors and variables gives the log-evidence estimate for VMP.
AverageLogFactor(IList<Gaussian>, Vector)
Evidence message for VMP.
Declaration
public static double AverageLogFactor(IList<Gaussian> array, Vector vector)
Parameters
Type | Name | Description |
---|---|---|
IList<Gaussian> | array | Incoming message from |
Vector | vector | Constant value for |
Returns
Type | Description |
---|---|
Double | Zero. |
Remarks
In Variational Message Passing, the evidence contribution of a deterministic factor is zero. Adding up these values across all factors and variables gives the log-evidence estimate for VMP.
AverageLogFactor(Double[], VectorGaussian)
Evidence message for VMP.
Declaration
public static double AverageLogFactor(double[] array, VectorGaussian vector)
Parameters
Type | Name | Description |
---|---|---|
Double[] | array | Constant value for |
VectorGaussian | vector | Incoming message from |
Returns
Type | Description |
---|---|
Double | Zero. |
Remarks
In Variational Message Passing, the evidence contribution of a deterministic factor is zero. Adding up these values across all factors and variables gives the log-evidence estimate for VMP.
AverageLogFactor(Double[], VectorGaussianMoments)
Evidence message for VMP.
Declaration
public static double AverageLogFactor(double[] array, VectorGaussianMoments vector)
Parameters
Type | Name | Description |
---|---|---|
Double[] | array | Constant value for |
VectorGaussianMoments | vector | Incoming message from |
Returns
Type | Description |
---|---|
Double | Zero. |
Remarks
In Variational Message Passing, the evidence contribution of a deterministic factor is zero. Adding up these values across all factors and variables gives the log-evidence estimate for VMP.
AverageLogFactor(Double[], Vector)
Evidence message for VMP.
Declaration
public static double AverageLogFactor(double[] array, Vector vector)
Parameters
Type | Name | Description |
---|---|---|
Double[] | array | Constant value for |
Vector | vector | Constant value for |
Returns
Type | Description |
---|---|
Double | Zero. |
Remarks
The formula for the result is log(factor(array,vector))
. Adding up these values across all factors and variables gives the log-evidence estimate for VMP.
LogAverageFactor(IList<Gaussian>, VectorGaussian, VectorGaussian)
Evidence message for EP.
Declaration
public static double LogAverageFactor(IList<Gaussian> array, VectorGaussian vector, VectorGaussian to_vector)
Parameters
Type | Name | Description |
---|---|---|
IList<Gaussian> | array | Incoming message from |
VectorGaussian | vector | Incoming message from |
VectorGaussian | to_vector | 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_(array,vector) p(array,vector) factor(array,vector))
.
LogAverageFactor(IList<Gaussian>, VectorGaussianMoments, VectorGaussianMoments)
Evidence message for EP.
Declaration
public static double LogAverageFactor(IList<Gaussian> array, VectorGaussianMoments vector, VectorGaussianMoments to_vector)
Parameters
Type | Name | Description |
---|---|---|
IList<Gaussian> | array | Incoming message from |
VectorGaussianMoments | vector | Incoming message from |
VectorGaussianMoments | to_vector | 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_(array,vector) p(array,vector) factor(array,vector))
.
LogAverageFactor(Double[], VectorGaussian)
Evidence message for EP.
Declaration
public static double LogAverageFactor(double[] array, VectorGaussian vector)
Parameters
Type | Name | Description |
---|---|---|
Double[] | array | Constant value for |
VectorGaussian | vector | 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_(vector) p(vector) factor(array,vector))
.
LogAverageFactor(Double[], VectorGaussianMoments)
Evidence message for EP.
Declaration
public static double LogAverageFactor(double[] array, VectorGaussianMoments vector)
Parameters
Type | Name | Description |
---|---|---|
Double[] | array | Constant value for |
VectorGaussianMoments | vector | 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_(vector) p(vector) factor(array,vector))
.
LogAverageFactor(Double[], Vector)
Evidence message for EP.
Declaration
public static double LogAverageFactor(double[] array, Vector vector)
Parameters
Type | Name | Description |
---|---|---|
Double[] | array | Constant value for |
Vector | vector | 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(array,vector))
.
LogEvidenceRatio(IList<Gaussian>, VectorGaussian, VectorGaussian, IList<Gaussian>)
Evidence message for EP.
Declaration
public static double LogEvidenceRatio(IList<Gaussian> array, VectorGaussian vector, VectorGaussian to_vector, IList<Gaussian> to_array)
Parameters
Type | Name | Description |
---|---|---|
IList<Gaussian> | array | Incoming message from |
VectorGaussian | vector | Incoming message from |
VectorGaussian | to_vector | Outgoing message to |
IList<Gaussian> | to_array | 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_(array,vector) p(array,vector) factor(array,vector) / sum_array p(array) messageTo(array))
. Adding up these values across all factors and variables gives the log-evidence estimate for EP.
LogEvidenceRatio(IList<Gaussian>, VectorGaussianMoments, VectorGaussianMoments, IList<Gaussian>)
Evidence message for EP.
Declaration
public static double LogEvidenceRatio(IList<Gaussian> array, VectorGaussianMoments vector, VectorGaussianMoments to_vector, IList<Gaussian> to_array)
Parameters
Type | Name | Description |
---|---|---|
IList<Gaussian> | array | Incoming message from |
VectorGaussianMoments | vector | Incoming message from |
VectorGaussianMoments | to_vector | Outgoing message to |
IList<Gaussian> | to_array | 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_(array,vector) p(array,vector) factor(array,vector) / sum_array p(array) messageTo(array))
. Adding up these values across all factors and variables gives the log-evidence estimate for EP.
LogEvidenceRatio(Double[], VectorGaussian)
Evidence message for EP.
Declaration
public static double LogEvidenceRatio(double[] array, VectorGaussian vector)
Parameters
Type | Name | Description |
---|---|---|
Double[] | array | Constant value for |
VectorGaussian | vector | 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_(vector) p(vector) factor(array,vector))
. Adding up these values across all factors and variables gives the log-evidence estimate for EP.
LogEvidenceRatio(Double[], VectorGaussianMoments)
Evidence message for EP.
Declaration
public static double LogEvidenceRatio(double[] array, VectorGaussianMoments vector)
Parameters
Type | Name | Description |
---|---|---|
Double[] | array | Constant value for |
VectorGaussianMoments | vector | 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_(vector) p(vector) factor(array,vector))
. Adding up these values across all factors and variables gives the log-evidence estimate for EP.
LogEvidenceRatio(Double[], Vector)
Evidence message for EP.
Declaration
public static double LogEvidenceRatio(double[] array, Vector vector)
Parameters
Type | Name | Description |
---|---|---|
Double[] | array | Constant value for |
Vector | vector | 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(array,vector))
. Adding up these values across all factors and variables gives the log-evidence estimate for EP.
VectorAverageConditional(IList<Gaussian>, VectorGaussian)
EP message to vector
.
Declaration
public static VectorGaussian VectorAverageConditional([SkipIfAllUniform] IList<Gaussian> array, VectorGaussian result)
Parameters
Type | Name | Description |
---|---|---|
IList<Gaussian> | array | Incoming message from |
VectorGaussian | result | Modified to contain the outgoing message. |
Returns
Type | Description |
---|---|
VectorGaussian |
|
Remarks
The outgoing message is a distribution matching the moments of vector
as the random arguments are varied. The formula is proj[p(vector) sum_(array) p(array) factor(array,vector)]/p(vector)
.
Exceptions
Type | Condition |
---|---|
ImproperMessageException |
|
VectorAverageConditional(IList<Gaussian>, VectorGaussianMoments)
EP message to vector
.
Declaration
public static VectorGaussianMoments VectorAverageConditional([SkipIfAllUniform] IList<Gaussian> array, VectorGaussianMoments result)
Parameters
Type | Name | Description |
---|---|---|
IList<Gaussian> | array | Incoming message from |
VectorGaussianMoments | result | Modified to contain the outgoing message. |
Returns
Type | Description |
---|---|
VectorGaussianMoments |
|
Remarks
The outgoing message is a distribution matching the moments of vector
as the random arguments are varied. The formula is proj[p(vector) sum_(array) p(array) factor(array,vector)]/p(vector)
.
Exceptions
Type | Condition |
---|---|
ImproperMessageException |
|
VectorAverageConditional(Double[], VectorGaussian)
EP message to vector
.
Declaration
public static VectorGaussian VectorAverageConditional(double[] array, VectorGaussian result)
Parameters
Type | Name | Description |
---|---|---|
Double[] | array | Constant value for |
VectorGaussian | result | Modified to contain the outgoing message. |
Returns
Type | Description |
---|---|
VectorGaussian |
|
Remarks
The outgoing message is the factor viewed as a function of vector
conditioned on the given values.
VectorAverageConditional(Double[], VectorGaussianMoments)
EP message to vector
.
Declaration
public static VectorGaussianMoments VectorAverageConditional(double[] array, VectorGaussianMoments result)
Parameters
Type | Name | Description |
---|---|---|
Double[] | array | Constant value for |
VectorGaussianMoments | result | Modified to contain the outgoing message. |
Returns
Type | Description |
---|---|
VectorGaussianMoments |
|
Remarks
The outgoing message is the factor viewed as a function of vector
conditioned on the given values.
VectorAverageLogarithm(IList<Gaussian>, VectorGaussian)
VMP message to vector
.
Declaration
public static VectorGaussian VectorAverageLogarithm([SkipIfAllUniform] IList<Gaussian> array, VectorGaussian result)
Parameters
Type | Name | Description |
---|---|---|
IList<Gaussian> | array | Incoming message from |
VectorGaussian | result | Modified to contain the outgoing message. |
Returns
Type | Description |
---|---|
VectorGaussian |
|
Remarks
The outgoing message is the factor viewed as a function of vector
with array
integrated out. The formula is sum_array p(array) factor(array,vector)
.
Exceptions
Type | Condition |
---|---|
ImproperMessageException |
|
VectorAverageLogarithm(IList<Gaussian>, VectorGaussianMoments)
VMP message to vector
.
Declaration
public static VectorGaussianMoments VectorAverageLogarithm([SkipIfAllUniform] IList<Gaussian> array, VectorGaussianMoments result)
Parameters
Type | Name | Description |
---|---|---|
IList<Gaussian> | array | Incoming message from |
VectorGaussianMoments | result | Modified to contain the outgoing message. |
Returns
Type | Description |
---|---|
VectorGaussianMoments |
|
Remarks
The outgoing message is the factor viewed as a function of vector
with array
integrated out. The formula is sum_array p(array) factor(array,vector)
.
Exceptions
Type | Condition |
---|---|
ImproperMessageException |
|
VectorAverageLogarithm(Double[], VectorGaussian)
VMP message to vector
.
Declaration
public static VectorGaussian VectorAverageLogarithm(double[] array, VectorGaussian result)
Parameters
Type | Name | Description |
---|---|---|
Double[] | array | Constant value for |
VectorGaussian | result | Modified to contain the outgoing message. |
Returns
Type | Description |
---|---|
VectorGaussian |
|
Remarks
The outgoing message is the factor viewed as a function of vector
conditioned on the given values.
VectorAverageLogarithm(Double[], VectorGaussianMoments)
VMP message to vector
.
Declaration
public static VectorGaussianMoments VectorAverageLogarithm(double[] array, VectorGaussianMoments result)
Parameters
Type | Name | Description |
---|---|---|
Double[] | array | Constant value for |
VectorGaussianMoments | result | Modified to contain the outgoing message. |
Returns
Type | Description |
---|---|
VectorGaussianMoments |
|
Remarks
The outgoing message is the factor viewed as a function of vector
conditioned on the given values.