MCPcopy Create free account
hub / github.com/PythonOT/POT / gaussian_pdf

Function gaussian_pdf

ot/gmm.py:51–71  ·  view source on GitHub ↗

r""" Compute the probability density function of a multivariate Gaussian distribution. Parameters ---------- x : array-like, shape (..., d) The input samples. m : array-like, shape (d,) The mean vector of the Gaussian distribution. C : array-like, shape (

(x, m, C)

Source from the content-addressed store, hash-verified

49
50
51def gaussian_pdf(x, m, C):
52 r"""
53 Compute the probability density function of a multivariate
54 Gaussian distribution.
55
56 Parameters
57 ----------
58 x : array-like, shape (..., d)
59 The input samples.
60 m : array-like, shape (d,)
61 The mean vector of the Gaussian distribution.
62 C : array-like, shape (d, d)
63 The covariance matrix of the Gaussian distribution.
64
65 Returns
66 -------
67 pdf : array-like, shape (...,)
68 The probability density function evaluated at each sample.
69
70 """
71 return get_backend(x, m, C).exp(gaussian_logpdf(x, m, C))
72
73
74def gmm_pdf(x, m, C, w):

Callers 3

test_gaussian_pdfFunction · 0.90
gmm_pdfFunction · 0.85
Tk0k1Function · 0.85

Calls 3

get_backendFunction · 0.85
gaussian_logpdfFunction · 0.85
expMethod · 0.45

Tested by 1

test_gaussian_pdfFunction · 0.72