Skip to content
Permalink
Browse files

Merge pull request #3472 from Dpananos/pr_fix

Fix for #3450
  • Loading branch information...
michaelosthege committed May 12, 2019
2 parents c487b34 + e9b9a44 commit 2545d60a0749aad14cb028749d12cd58b50e211a
Showing with 6 additions and 2 deletions.
  1. +1 −1 pymc3/distributions/multivariate.py
  2. +5 −1 pymc3/tests/test_distributions.py
@@ -143,7 +143,7 @@ def _repr_cov_params(self, dist=None):
if dist is None:
dist = self
if self._cov_type == 'chol':
chol = get_variable_name(self.chol)
chol = get_variable_name(self.chol_cov)
return r'\mathit{{chol}}={}'.format(chol)
elif self._cov_type == 'cov':
cov = get_variable_name(self.cov)
@@ -1326,17 +1326,21 @@ def setup_class(self):
b = Normal('beta', mu=0, sigma=10, shape=(2,), observed=beta)
sigma = HalfNormal('sigma', sigma=1)

#Test Cholesky parameterization
Z = MvNormal('Z', mu=np.zeros(2), chol=np.eye(2), shape=(2,))

# Expected value of outcome
mu = Deterministic('mu', floatX(alpha + tt.dot(X, b)))

# Likelihood (sampling distribution) of observations
Y_obs = Normal('Y_obs', mu=mu, sigma=sigma, observed=Y)
self.distributions = [alpha, sigma, mu, b, Y_obs]
self.distributions = [alpha, sigma, mu, b, Z, Y_obs]
self.expected = (
r'$\text{alpha} \sim \text{Normal}(\mathit{mu}=0.0,~\mathit{sigma}=10.0)$',
r'$\text{sigma} \sim \text{HalfNormal}(\mathit{sigma}=1.0)$',
r'$\text{mu} \sim \text{Deterministic}(\text{alpha},~\text{Constant},~\text{beta})$',
r'$\text{beta} \sim \text{Normal}(\mathit{mu}=0.0,~\mathit{sigma}=10.0)$',
r'$Z \sim \text{MvNormal}(\mathit{mu}=array, \mathit{chol}=array)$',
r'$\text{Y_obs} \sim \text{Normal}(\mathit{mu}=\text{mu},~\mathit{sigma}=f(\text{sigma}))$'
)

0 comments on commit 2545d60

Please sign in to comment.
You can’t perform that action at this time.