Steve L. Nyemba 8 年之前
父節點
當前提交
537f359527
共有 1 個文件被更改,包括 3 次插入2 次删除
  1. 3 2
      test/demo.py

+ 3 - 2
test/demo.py

@@ -15,8 +15,9 @@ nm = np.matrix([x__,y__])
 cx = np.cov(nm)
 cx = np.cov(nm)
 print cx.shape
 print cx.shape
 x = np.array([1.9,3])
 x = np.array([1.9,3])
-
-a = 1/ np.sqrt(2*np.pi)
+n = 2
+a = 1/ np.sqrt((2*np.pi**k)*np.det(cx))
+b = np.exp(() )
 #from scipy.stats import multivariate_normal
 #from scipy.stats import multivariate_normal
 #print multivariate_normal.pdf(x,u,cx)
 #print multivariate_normal.pdf(x,u,cx)