Skip to content

Commit 6bb279b

Browse files
committed
remove tests
1 parent a0aed9e commit 6bb279b

File tree

2 files changed

+2
-81
lines changed

2 files changed

+2
-81
lines changed

pymc/gp/gp.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -458,8 +458,7 @@ def marginal_likelihood(
458458
name,
459459
X,
460460
y,
461-
sigma=None,
462-
noise=None,
461+
sigma,
463462
jitter=JITTER_DEFAULT,
464463
is_observed=True,
465464
**kwargs,
@@ -777,7 +776,7 @@ def _build_marginal_likelihood_loglik(self, y, X, Xu, sigma, jitter):
777776
quadratic = 0.5 * (pt.dot(r, r_l) - pt.dot(c, c))
778777
return -1.0 * (constant + logdet + quadratic + trace)
779778

780-
def marginal_likelihood(self, name, X, Xu, y, sigma=None, jitter=JITTER_DEFAULT, **kwargs):
779+
def marginal_likelihood(self, name, X, Xu, y, sigma, jitter=JITTER_DEFAULT, **kwargs):
781780
R"""
782781
Return the approximate marginal likelihood distribution.
783782

tests/gp/test_gp.py

Lines changed: 0 additions & 78 deletions
Original file line numberDiff line numberDiff line change
@@ -25,84 +25,6 @@
2525
from pymc.math import cartesian
2626

2727

28-
class TestSigmaParams:
29-
def setup_method(self):
30-
"""Common setup."""
31-
self.x = np.linspace(-5, 5, 30)[:, None]
32-
self.xu = np.linspace(-5, 5, 10)[:, None]
33-
self.y = np.random.normal(0.25 * self.x, 0.1)
34-
35-
with pm.Model() as self.model:
36-
cov_func = pm.gp.cov.Linear(1, c=0.0)
37-
c = pm.Normal("c", mu=20.0, sigma=100.0)
38-
mean_func = pm.gp.mean.Constant(c)
39-
self.gp = self.gp_implementation(mean_func=mean_func, cov_func=cov_func)
40-
self.sigma = pm.HalfNormal("sigma", sigma=100)
41-
42-
43-
class TestMarginalSigmaParams(TestSigmaParams):
44-
R"""Tests for the deprecation warnings and raising ValueError."""
45-
46-
gp_implementation = pm.gp.Marginal
47-
48-
def test_catch_warnings(self):
49-
"""Warning from using the old noise parameter."""
50-
with self.model:
51-
with pytest.warns(FutureWarning):
52-
self.gp.marginal_likelihood("lik_noise", X=self.x, y=self.y, noise=self.sigma)
53-
54-
with pytest.warns(FutureWarning):
55-
self.gp.conditional(
56-
"cond_noise",
57-
Xnew=self.x,
58-
given={
59-
"noise": self.sigma,
60-
},
61-
)
62-
63-
def test_raise_value_error(self):
64-
"""Either both or neither parameter is specified."""
65-
with self.model:
66-
with pytest.raises(ValueError):
67-
self.gp.marginal_likelihood(
68-
"like_both", X=self.x, y=self.y, noise=self.sigma, sigma=self.sigma
69-
)
70-
71-
with pytest.raises(ValueError):
72-
self.gp.marginal_likelihood("like_neither", X=self.x, y=self.y)
73-
74-
75-
class TestMarginalApproxSigmaParams(TestSigmaParams):
76-
R"""Tests for the deprecation warnings and raising ValueError"""
77-
78-
gp_implementation = pm.gp.MarginalApprox
79-
80-
@pytest.mark.xfail(reason="Possible shape problem, see #6366")
81-
def test_catch_warnings(self):
82-
"""Warning from using the old noise parameter."""
83-
with self.model:
84-
with pytest.warns(FutureWarning):
85-
self.gp.marginal_likelihood(
86-
"lik_noise", X=self.x, Xu=self.xu, y=self.y, noise=self.sigma
87-
)
88-
89-
def test_raise_value_error(self):
90-
"""Either both or neither parameter is specified."""
91-
with self.model:
92-
with pytest.raises(ValueError):
93-
self.gp.marginal_likelihood(
94-
"like_both",
95-
X=self.x,
96-
Xu=self.xu,
97-
y=self.y,
98-
noise=self.sigma,
99-
sigma=self.sigma,
100-
)
101-
102-
with pytest.raises(ValueError):
103-
self.gp.marginal_likelihood("like_neither", X=self.x, Xu=self.xu, y=self.y)
104-
105-
10628
class TestMarginalVsMarginalApprox:
10729
R"""
10830
Compare test fits of models Marginal and MarginalApprox.

0 commit comments

Comments
 (0)