Skip to content

Commit 173b913

Browse files
committed
debugging
Signed-off-by: Oliver Schacht <[email protected]>
1 parent cd61fa4 commit 173b913

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

causallearn/utils/RCIT/RCIT.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ def random_fourier_features(self, x, w=None, b=None, num_f=None, sigma=None):
132132

133133
return feat
134134

135-
def matrix_cov(mat_a, mat_b):
135+
def matrix_cov(self, mat_a, mat_b):
136136
n_obs = mat_a.shape[0]
137137

138138
assert mat_a.shape == mat_b.shape
@@ -184,8 +184,8 @@ def compute_pvalue(self, data_x, data_y):
184184
p = 1 - (np.sum(sta >= stas) / len(stas))
185185

186186
else:
187-
res_x = f_x - np.meshgrid(f_x.mean(axis=0), (r, 1))
188-
res_y = f_y - np.meshgrid(f_y.mean(axis=0), (r, 1))
187+
res_x = f_x - f_x.mean(axis=0)
188+
res_y = f_y - f_y.mean(axis=0)
189189

190190
d = list(itertools.product(range(f_x.shape[1]), range(f_y.shape[1])))
191191
res = np.array([res_x[:, idx_x] * res_y[:, idx_y] for idx_x, idx_y in d]).T
@@ -239,7 +239,7 @@ def random_fourier_features(self, x, w=None, b=None, num_f=None, sigma=None):
239239

240240
return feat
241241

242-
def matrix_cov(mat_a, mat_b):
242+
def matrix_cov(self, mat_a, mat_b):
243243
n_obs = mat_a.shape[0]
244244

245245
assert mat_a.shape == mat_b.shape

0 commit comments

Comments
 (0)