Skip to content

Commit

Permalink
Update continuous.py (#1679)
Browse files Browse the repository at this point in the history
closes #1634
  • Loading branch information
etymology authored Nov 16, 2023
1 parent 1528036 commit f3b66d7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion numpyro/distributions/continuous.py
Original file line number Diff line number Diff line change
Expand Up @@ -882,7 +882,7 @@ def model(y): # y has dimension N x d
concentration = jnp.ones(1) # Implies a uniform distribution over correlation matrices
corr_mat = numpyro.sample("corr_mat", dist.LKJ(d, concentration))
sigma = jnp.sqrt(theta)
# we can also use a faster formula `cov_mat = jnp.outer(theta, theta) * corr_mat`
# we can also use a faster formula `cov_mat = jnp.outer(sigma, sigma) * corr_mat`
cov_mat = jnp.matmul(jnp.matmul(jnp.diag(sigma), corr_mat), jnp.diag(sigma))
# Vector of expectations
Expand Down

0 comments on commit f3b66d7

Please sign in to comment.