Click or drag to resize
VectorGaussian Class
Microsoft Research
Represents a multivariate Gaussian distribution.
Inheritance Hierarchy
SystemObject
  MicrosoftResearch.Infer.DistributionsVectorGaussian

Namespace: MicrosoftResearch.Infer.Distributions
Assembly: Infer.Runtime (in Infer.Runtime.dll) Version: 2.6.41128.1 (2.6.41128.1)
Syntax
[SerializableAttribute]
[Quality(QualityBand.Mature)]
public class VectorGaussian : IDistribution<Vector>, 
	ICloneable, HasPoint<Vector>, CanGetLogProb<Vector>, 
	SettableTo<VectorGaussian>, SettableToProduct<VectorGaussian>, SettableToProduct<VectorGaussian, VectorGaussian>, 
	Diffable, SettableToUniform, SettableToRatio<VectorGaussian>, SettableToRatio<VectorGaussian, VectorGaussian>, 
	SettableToPower<VectorGaussian>, SettableToWeightedSum<VectorGaussian>, Sampleable<Vector>, 
	CanSamplePrep<VectorGaussian, Vector>, CanGetLogProbPrep<VectorGaussian, Vector>, 
	CanGetMean<Vector>, CanGetVariance<PositiveDefiniteMatrix>, CanGetMeanAndVariance<Vector, PositiveDefiniteMatrix>, 
	CanSetMeanAndVariance<Vector, PositiveDefiniteMatrix>, CanGetLogAverageOf<VectorGaussian>, 
	CanGetLogAverageOfPower<VectorGaussian>, CanGetAverageLog<VectorGaussian>, CanGetLogNormalizer, 
	CanGetMode<Vector>

The VectorGaussian type exposes the following members.

Constructors
  NameDescription
Public methodVectorGaussian(Int32)
Creates a uniform VectorGaussian of a given dimension
Public methodVectorGaussian(VectorGaussian)
Sets this VectorGaussian to the value of another
Public methodVectorGaussian(Double, Double)
Creates a 1D VectorGaussian with given mean and variance.
Public methodVectorGaussian(Vector, PositiveDefiniteMatrix)
Creates a Gaussian with given mean and variance.
Top
Methods
  NameDescription
Public methodClone
Clones this VectorGaussian.
Public methodStatic memberCopy
Creates a copy of a given VectorGaussian
Public methodStatic memberFromCursors
Creates a Gaussian from Cursor objects.
Public methodStatic memberFromMeanAndPrecision(Double, Double)
Creates a 1D VectorGaussian with given mean and precision.
Public methodStatic memberFromMeanAndPrecision(Vector, PositiveDefiniteMatrix)
Create a VectorGaussian with given mean and precision matrix.
Public methodStatic memberFromMeanAndVariance(Double, Double)
Creates a 1D VectorGaussian with given mean and variance.
Public methodStatic memberFromMeanAndVariance(Vector, PositiveDefiniteMatrix)
Create a Gaussian with given mean and variance.
Public methodStatic memberFromNatural
Create a new VectorGaussian from its natural parameters (Mean times precision, and precision)
Public methodGetAverageLog
The expected logarithm of that distribution under this distribution.
Public methodGetLogAverageOf
Log-integral of the product of this VectorGaussian with that VectorGaussian
Public methodGetLogAverageOfPower
Get the integral of this distribution times another distribution raised to a power.
Public methodGetLogNormalizer
Gets the normalizer for the VectorGaussian density function
Public methodGetLogProb(Vector)
Evaluates the log of the multivariate Gaussian density.
Public methodGetLogProb(Vector, LowerTriangularMatrix, Vector)
Evaluates the log of the multivariate Gaussian density.
Public methodStatic memberGetLogProb(Vector, Vector, PositiveDefiniteMatrix)
Evaluate the log of multivariate Gaussian density with specified mean vector and covariance matrix
Public methodStatic memberGetLogProb(Vector, Vector, PositiveDefiniteMatrix, LowerTriangularMatrix, Vector)
Evaluates the log of the multivariate Gaussian density.
Public methodGetLogProbPrep
Returns an Evaluator delegate which has a pre-allocated workspace for efficient evaluation calculation. If you are generating many evaluations, call this method to get an Evaluator, then use the Evaluator delegate to calculate the evaluations
Public methodGetMarginal(Int32)
The marginal distribution of one dimension.
Public methodGetMarginal(Int32, VectorGaussian)
The marginal distribution of a subvector.
Public methodGetMean
Gets the mean of the distribution.
Public methodGetMean(Vector)
Gets the mean of the distribution
Public methodGetMean(Vector, PositiveDefiniteMatrix)
Get the mean of the distribution
Public methodGetMeanAndPrecision
Gets the mean vector and precsion matrix of the distribution
Public methodGetMeanAndVariance
Gets the mean and variance of the distribution.
Public methodGetMode
The most likely value
Public methodGetVariance
Gets the variance-covariance matrix of the distribution.
Public methodGetVariance(PositiveDefiniteMatrix)
Gets the variance-covariance matrix of the distribution.
Public methodIsProper
Asks whether this VectorGaussian instance is proper or not. A VectorGaussian distribution is proper only if its precision matrix is positive definite.
Public methodIsUniform
Asks whether this instance is uniform
Public methodMaxDiff
The maximum difference between the parameters of this VectorGaussian and that VectorGaussian
Public methodStatic memberPointMass(Double)
Creates a VectorGaussian point mass where the location is a vector of identical values
Public methodStatic memberPointMass(Vector)
Creates a VectorGaussian point mass at the specified location
Public methodSample
Sample from this VectorGaussian distribution
Public methodSample(Vector)
Samples from this VectorGaussian distribution
Public methodSample(Vector, LowerTriangularMatrix)
Samples from this VectorGaussian distribution
Public methodStatic memberSample(Vector, PositiveDefiniteMatrix)
Samples from a VectorGaussian distribution with the specified mean and precision
Public methodStatic memberSampleFromMeanAndVariance
Samples from a VectorGaussian distribution with the specified mean and variance
Public methodSamplePrep
Returns a sampler delegate which has a pre-allocated workspace for efficient sample calculation. If you are generating many samples, call this method to get a sampler, then use the sampler delegate to generate samples.
Public methodSetMeanAndPrecision
Sets the mean and precision of the distribution.
Public methodSetMeanAndVariance
Sets the mean and variance of the distribution.
Public methodSetNatural
Sets the natural parameters of the distribution (mean times precision, and precision)
Public methodSetTo
Sets this VectorGaussian instance to have the parameter values of that VectorGaussian instance
Public methodSetToPower
Sets the parameters to represent the power of a source VectorGaussian to some exponent.
Public methodSetToProduct
Sets the parameters to represent the product of two VectorGaussians.
Public methodSetToRatio
Sets the parameters to represent the product of two VectorGaussians.
Public methodSetToSum
Sets the mean and covariance to match a VectorGaussian mixture.
Public methodSetToUniform
Sets this VectorGaussian instance to be a uniform distribution
Public methodStatic memberUniform
Creates a uniform VectorGaussian of a given dimension
Public methodStatic memberWeightedSumT
Top
Operators
  NameDescription
Public operatorStatic memberDivision
Creates a new VectorGaussian which the ratio of two other VectorGaussians
Public operatorStatic memberExclusiveOr
Raises a distribution to a power.
Public operatorStatic memberMultiply
Creates a new VectorGaussian which the product of two other VectorGaussians
Top
Properties
  NameDescription
Public propertyDimension
The dimension of the VectorGaussian domain
Public propertyIsPointMass
Asks whether the instance is a point mass
Public propertyMeanTimesPrecision
Gets/Sets Mean times precision
Public propertyPoint
Sets/gets the instance as a point mass
Public propertyPrecision
Gets/sets precision value
Top
Remarks

The distribution is parameterized by MeanTimesPrecision and Precision. Precision is the inverse of the variance, so a Gaussian with mean m and variance v is represented as Precision = inv(v), MeanTimesPrecision = inv(v)*m.

Some special cases: If the precision is zero, then the distribution is uniform. If the precision is infinite along the diagonal, then the distribution is a point mass. The Point property gives the location of the point mass. If precision[i,i] is infinite, then the distribution is a point mass along dimension i. Point[i] gives the mean. The rest of the row and column of precision must be zero.

The formula for the distribution is: N(x;m,v) = |2*pi*v|^(-d/2) * exp(-0.5 (x-m)' inv(v) (x-m)). When v=0, this reduces to delta(x-m). When v=infinity, the density is redefined to be 1. When v is singular, the density is redefined to be exp(-0.5 x' inv(v) x + x' inv(v) m), i.e. we drop the terms |2*pi*v|^(-d/2) * exp(-0.5 m' inv(v) m).

See Also