Skip to content

Commit

Permalink
Fixed bug.
Browse files Browse the repository at this point in the history
  • Loading branch information
Mark van der Wilk committed Jan 26, 2014
1 parent b8dbc5d commit 72abb13
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion kernel_exp.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ def calc_expect_K_mi (Z, hyp_ard, X_mu, X_S):
# print time.time() - t

# t = time.time()
res2 = (sf**2 / np.prod((X_S[:, :] * alpha[None, :] + 1.)**0.5, 1)[:, None]) * np.exp(-0.5*np.sum( ( (Z[None, :, :] - X_mu[:, None, :])**2 * alpha[None, None, :] ) / (X_S[:, None, :] + 1.) , 2))
res2 = (sf**2 / np.prod((X_S[:, :] * alpha[None, :] + 1.)**0.5, 1)[:, None]) * np.exp(-0.5*np.sum( ( (Z[None, :, :] - X_mu[:, None, :])**2 * alpha[None, None, :] ) / (alpha[None, None, :] * X_S[:, None, :] + 1.) , 2))
# print time.time() - t

# assert np.sum(np.abs(res - res2)) < 10**-12
Expand Down

0 comments on commit 72abb13

Please sign in to comment.