MultivariateGaussian

class pyspark.mllib.stat.MultivariateGaussian[source]

Represents a (mu, sigma) tuple

>>> m = MultivariateGaussian(Vectors.dense([11,12]),DenseMatrix(2, 2, (1.0, 3.0, 5.0, 2.0)))
>>> (m.mu, m.sigma.toArray())
(DenseVector([11.0, 12.0]), array([[ 1., 5.],[ 3., 2.]]))
>>> (m[0], m[1])
(DenseVector([11.0, 12.0]), array([[ 1., 5.],[ 3., 2.]]))

Methods

Attributes

Methods Documentation

count(value) → integer – return number of occurrences of value
index(value[, start[, stop]]) → integer – return first index of value.

Raises ValueError if the value is not present.

Attributes Documentation

mu

Alias for field number 0

sigma

Alias for field number 1