# Class MultivariateGaussian

Object
org.apache.spark.ml.stat.distribution.MultivariateGaussian
All Implemented Interfaces:
`Serializable`, `scala.Serializable`

public class MultivariateGaussian extends Object implements scala.Serializable
This class provides basic functionality for a Multivariate Gaussian (Normal) Distribution. In the event that the covariance matrix is singular, the density will be computed in a reduced dimensional subspace under which the distribution is supported. (see here)

param: mean The mean vector of the distribution param: cov The covariance matrix of the distribution

• ## Constructor Summary

Constructors
Constructor
Description
```MultivariateGaussian(Vector mean, Matrix cov)```

• ## Method Summary

Modifier and Type
Method
Description
`Matrix`
`cov()`

`double`
`logpdf(Vector x)`
Returns the log-density of this multivariate Gaussian at given point, x
`Vector`
`mean()`

`double`
`pdf(Vector x)`
Returns density of this multivariate Gaussian at given point, x

### Methods inherited from class java.lang.Object

`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`
• ## Constructor Details

• ### MultivariateGaussian

public MultivariateGaussian(Vector mean, Matrix cov)
• ## Method Details

• ### cov

public Matrix cov()
• ### logpdf

public double logpdf(Vector x)
Returns the log-density of this multivariate Gaussian at given point, x
Parameters:
`x` - (undocumented)
Returns:
(undocumented)
• ### mean

public Vector mean()
• ### pdf

public double pdf(Vector x)
Returns density of this multivariate Gaussian at given point, x
Parameters:
`x` - (undocumented)
Returns:
(undocumented)