From abde49e7e84fbe52849fe6ccebcedc9d85564d1c Mon Sep 17 00:00:00 2001 From: Daniel Emaasit Date: Mon, 3 Dec 2018 11:20:29 -0500 Subject: [PATCH] add constant mean function for gpr --- pmlearn/__init__.py | 2 +- pmlearn/gaussian_process/gpr.py | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/pmlearn/__init__.py b/pmlearn/__init__.py index 41a115e..98e3329 100644 --- a/pmlearn/__init__.py +++ b/pmlearn/__init__.py @@ -10,7 +10,7 @@ See http://pymc-learn.org for complete documentation. """ -__version__ = '0.0.1.rc2' +__version__ = '0.0.1.rc3' __all__ = ['gaussian_process', 'linear_model', diff --git a/pmlearn/gaussian_process/gpr.py b/pmlearn/gaussian_process/gpr.py index 4f41373..0c06a03 100644 --- a/pmlearn/gaussian_process/gpr.py +++ b/pmlearn/gaussian_process/gpr.py @@ -144,7 +144,7 @@ def create_model(self): if self.prior_mean is None: mean_function = pm.gp.mean.Zero() else: - mean_function = self.prior_mean + mean_function = pm.gp.mean.Constant(c=self.prior_mean) self.gp = pm.gp.Latent(mean_func=mean_function, cov_func=cov_function) @@ -259,7 +259,7 @@ def create_model(self): if self.prior_mean is None: mean_function = pm.gp.mean.Zero() else: - mean_function = self.prior_mean + mean_function = pm.gp.mean.Constant(c=self.prior_mean) self.gp = pm.gp.Latent(mean_func=mean_function, cov_func=cov_function) @@ -373,7 +373,7 @@ def create_model(self): if self.prior_mean is None: mean_function = pm.gp.mean.Zero() else: - mean_function = self.prior_mean + mean_function = pm.gp.mean.Constant(c=self.prior_mean) self.gp = pm.gp.MarginalSparse(mean_func=mean_function, cov_func=cov_function,