From af52ff47f29c8fd478399e1b31779932fd37ec16 Mon Sep 17 00:00:00 2001 From: QiHong Lu Date: Mon, 14 Jan 2019 10:49:57 -0500 Subject: [PATCH] srm: subtract the subject-specific mean in .transform() --- brainiak/funcalign/srm.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/brainiak/funcalign/srm.py b/brainiak/funcalign/srm.py index 1eef5f79c..ab8bf4d93 100644 --- a/brainiak/funcalign/srm.py +++ b/brainiak/funcalign/srm.py @@ -260,7 +260,8 @@ def transform(self, X, y=None): s = [None] * len(X) for subject in range(len(X)): if X[subject] is not None: - s[subject] = self.w_[subject].T.dot(X[subject]) + s[subject] = self.w_[subject].T.dot( + X[subject] - self.mu_[subject][:, np.newaxis]) return s