From 9fe80701bc894ea102460b22db3ef4f8df371b92 Mon Sep 17 00:00:00 2001 From: Hiori Kino Date: Wed, 19 Aug 2020 10:39:20 +0900 Subject: [PATCH] "A is '***'" are replaced with "A == '***'" in core/model.py --- combo/blm/core/model.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/combo/blm/core/model.py b/combo/blm/core/model.py index 6a58e07..3a1ba1e 100644 --- a/combo/blm/core/model.py +++ b/combo/blm/core/model.py @@ -13,30 +13,30 @@ def __init__(self, lik, prior, options={}): self.stats = () def prepare(self, X, t, Psi=None): - if self.method is 'exact': + if self.method == 'exact': inf.exact.prepare(blm=self, X=X, t=t, Psi=Psi) else: pass def update_stats(self, x, t, psi=None): - if self.method is 'exact': + if self.method == 'exact': self.stats = inf.exact.update_stats(self, x, t, psi) else: pass def get_post_params_mean(self): - if self.method is 'exact': + if self.method == 'exact': self.lik.linear.params = inf.exact.get_post_params_mean(blm=self) def get_post_fmean(self, X, Psi=None, w=None): - if self.method is 'exact': + if self.method == 'exact': fmu = inf.exact.get_post_fmean(self, X, Psi, w) else: pass return fmu def sampling(self, w_mu=None, N=1, alpha=1.0): - if self.method is 'exact': + if self.method == 'exact': w_hat = inf.exact.sampling(self, w_mu, N, alpha=alpha) else: pass @@ -54,7 +54,7 @@ def predict_sampling(self, Xtest, Psi=None, N=1): * np.random.randn(Xtest.shape[0], N) def get_post_fcov(self, X, Psi=None, diag=True): - if self.method is 'exact': + if self.method == 'exact': fcov = inf.exact.get_post_fcov(self, X, Psi, diag=True) else: pass