Skip to content

Commit

Permalink
remove value= in test_conjugacy if unneeded
Browse files Browse the repository at this point in the history
  • Loading branch information
dustinvtran committed Apr 17, 2017
1 parent 97e1f42 commit b759569
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions tests/test-inferences/test_conjugacy.py
Expand Up @@ -85,6 +85,7 @@ def test_beta_binomial(self):
a0 = 0.5
b0 = 1.5
pi = rvs.Beta(a=a0, b=b0)
# use value since cannot sample
x = rvs.Binomial(n=n_data, p=pi, value=0.0)

pi_cond = ed.complete_conditional(pi, [pi, x])
Expand Down Expand Up @@ -122,7 +123,8 @@ def test_gamma_poisson(self):
alpha0 = 0.5
beta0 = 1.75
lam = rvs.Gamma(alpha=alpha0, beta=beta0)
x = rvs.Poisson(lam=lam, value=x_data, sample_shape=10)
# use value since cannot sample
x = rvs.Poisson(lam=lam, value=tf.zeros(10), sample_shape=10)

lam_cond = ed.complete_conditional(lam, [lam, x])

Expand All @@ -143,7 +145,7 @@ def test_gamma_gamma(self):
alpha_likelihood = 2.3
beta = rvs.Gamma(alpha=alpha0, beta=beta0)
x = rvs.Gamma(alpha=alpha_likelihood, beta=beta,
value=x_data, sample_shape=4)
sample_shape=4)

beta_cond = ed.complete_conditional(beta, [beta, x])

Expand All @@ -163,7 +165,7 @@ def test_mul_rate_gamma(self):
alpha_likelihood = 2.3
beta = rvs.Gamma(alpha=alpha0, beta=beta0)
x = rvs.Gamma(alpha=alpha_likelihood, beta=alpha_likelihood * beta,
value=x_data, sample_shape=4)
sample_shape=4)

beta_cond = ed.complete_conditional(beta, [beta, x])

Expand Down

0 comments on commit b759569

Please sign in to comment.