December 2017
Intermediate to advanced
386 pages
10h 42m
English
The probability of a given value in a multivariate Gaussian distribution is calculated as follows:
from scipy.stats import multivariate_normalimport numpy as np
x = np.array([[1,2], [3,4]])
In the preceding code snippet, we have initialized two data points located in a two-dimensional space.
multivariate_normal.pdf(x, mean=[0, 1], cov=[5, 2])array([ 0.0354664 , 0.00215671])
The output of the preceding code results in probabilities associated with the first data point [1, 2] and the second data point ...
Read now
Unlock full access