Skip to content

Commit 0b089af

Browse files
committed
fix cov_func mean_func defaults
1 parent be271ba commit 0b089af

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

pymc3/gp/gp.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ class Latent(Base):
9797
fcond = gp.conditional("fcond", Xnew=Xnew)
9898
"""
9999

100-
def __init__(self, mean_func=None, cov_func=None):
100+
def __init__(self, mean_func=Zero(), cov_func=Constant(0.0)):
101101
super(Latent, self).__init__(mean_func, cov_func)
102102

103103
def _build_prior(self, name, X, reparameterize=True, **kwargs):
@@ -218,7 +218,7 @@ class TP(Latent):
218218
219219
For more information, see https://www.cs.cmu.edu/~andrewgw/tprocess.pdf
220220
"""
221-
def __init__(self, mean_func=None, cov_func=None, nu=None):
221+
def __init__(self, mean_func=Zero(), cov_func=Constant(0.0), nu=None):
222222
if nu is None:
223223
raise ValueError("T Process requires a degrees of freedom parameter, 'nu'")
224224
self.nu = nu
@@ -353,7 +353,7 @@ class Marginal(Base):
353353
fcond = gp.conditional("fcond", Xnew=Xnew)
354354
"""
355355

356-
def __init__(self, mean_func=None, cov_func=None):
356+
def __init__(self, mean_func=Zero(), cov_func=Constant(0.0)):
357357
super(Marginal, self).__init__(mean_func, cov_func)
358358

359359
def _build_marginal_likelihood(self, X, noise):
@@ -592,7 +592,7 @@ class MarginalSparse(Marginal):
592592

593593
_available_approx = ("FITC", "VFE", "DTC")
594594

595-
def __init__(self, mean_func=None, cov_func=None, approx="FITC"):
595+
def __init__(self, mean_func=Zero(), cov_func=Constant(0.0), approx="FITC"):
596596
if approx not in self._available_approx:
597597
raise NotImplementedError(approx)
598598
self.approx = approx

0 commit comments

Comments
 (0)