@@ -97,7 +97,7 @@ class Latent(Base):
97
97
fcond = gp.conditional("fcond", Xnew=Xnew)
98
98
"""
99
99
100
- def __init__ (self , mean_func = None , cov_func = None ):
100
+ def __init__ (self , mean_func = Zero () , cov_func = Constant ( 0.0 ) ):
101
101
super (Latent , self ).__init__ (mean_func , cov_func )
102
102
103
103
def _build_prior (self , name , X , reparameterize = True , ** kwargs ):
@@ -218,7 +218,7 @@ class TP(Latent):
218
218
219
219
For more information, see https://www.cs.cmu.edu/~andrewgw/tprocess.pdf
220
220
"""
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 ):
222
222
if nu is None :
223
223
raise ValueError ("T Process requires a degrees of freedom parameter, 'nu'" )
224
224
self .nu = nu
@@ -353,7 +353,7 @@ class Marginal(Base):
353
353
fcond = gp.conditional("fcond", Xnew=Xnew)
354
354
"""
355
355
356
- def __init__ (self , mean_func = None , cov_func = None ):
356
+ def __init__ (self , mean_func = Zero () , cov_func = Constant ( 0.0 ) ):
357
357
super (Marginal , self ).__init__ (mean_func , cov_func )
358
358
359
359
def _build_marginal_likelihood (self , X , noise ):
@@ -592,7 +592,7 @@ class MarginalSparse(Marginal):
592
592
593
593
_available_approx = ("FITC" , "VFE" , "DTC" )
594
594
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" ):
596
596
if approx not in self ._available_approx :
597
597
raise NotImplementedError (approx )
598
598
self .approx = approx
0 commit comments