Skip to content

Commit abde49e

Browse files
committed
add constant mean function for gpr
1 parent 3b309bc commit abde49e

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

pmlearn/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
See http://pymc-learn.org for complete documentation.
1111
"""
1212

13-
__version__ = '0.0.1.rc2'
13+
__version__ = '0.0.1.rc3'
1414

1515
__all__ = ['gaussian_process',
1616
'linear_model',

pmlearn/gaussian_process/gpr.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ def create_model(self):
144144
if self.prior_mean is None:
145145
mean_function = pm.gp.mean.Zero()
146146
else:
147-
mean_function = self.prior_mean
147+
mean_function = pm.gp.mean.Constant(c=self.prior_mean)
148148

149149
self.gp = pm.gp.Latent(mean_func=mean_function,
150150
cov_func=cov_function)
@@ -259,7 +259,7 @@ def create_model(self):
259259
if self.prior_mean is None:
260260
mean_function = pm.gp.mean.Zero()
261261
else:
262-
mean_function = self.prior_mean
262+
mean_function = pm.gp.mean.Constant(c=self.prior_mean)
263263

264264
self.gp = pm.gp.Latent(mean_func=mean_function,
265265
cov_func=cov_function)
@@ -373,7 +373,7 @@ def create_model(self):
373373
if self.prior_mean is None:
374374
mean_function = pm.gp.mean.Zero()
375375
else:
376-
mean_function = self.prior_mean
376+
mean_function = pm.gp.mean.Constant(c=self.prior_mean)
377377

378378
self.gp = pm.gp.MarginalSparse(mean_func=mean_function,
379379
cov_func=cov_function,

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy