Skip to content

Commit b803533

Browse files
committed
Update KCI.py
1 parent 6a580ed commit b803533

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

causallearn/utils/KCI/KCI.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -306,8 +306,8 @@ def compute_pvalue(self, data_x=None, data_y=None, data_z=None):
306306
k_appr, theta_appr = self.get_kappa(uu_prod)
307307
pvalue = 1 - stats.gamma.cdf(test_stat, k_appr, 0, theta_appr)
308308
else:
309-
self.null_samples = self.null_sample_spectral(uu_prod, size_u, Kx.shape[0])
310-
pvalue = sum(self.null_samples > test_stat) / float(self.nullss)
309+
null_samples = self.null_sample_spectral(uu_prod, size_u, Kx.shape[0])
310+
pvalue = sum(null_samples > test_stat) / float(self.nullss)
311311
return pvalue, test_stat
312312

313313
def kernel_matrix(self, data_x, data_y, data_z):

0 commit comments

Comments
 (0)