简体   繁体   中英

Multivariate normal cdf

I am trying to use the multivariate cdf through the command in this link . I get an error saying the multivariate object has no cdf. The pdf is working fine however.

import numpy as np
from scipy.stats import norm
from scipy.stats import multivariate_normal as mvn

mean = np.array([0, 0])
covariance = np.array([[1, 0.4], [0.4, 1]])
mvna = mvn(mean, covariance)
print(mvna.cdf(np.array([-2, -4])))

multivariate_normal_frozen' object has no attribute 'cdf'

Are you sure that the version of scipy you are using is the same? I am seeing other versions that do not have the cdf method. Like in here: http://lagrange.univ-lyon1.fr/docs/scipy/0.17.1/generated/scipy.stats.multivariate_normal.html

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM