Skip to content

Commit

Permalink
Update KCI.py
Browse files Browse the repository at this point in the history
  • Loading branch information
MarkDana committed Nov 5, 2024
1 parent 6a580ed commit b803533
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions causallearn/utils/KCI/KCI.py
Original file line number Diff line number Diff line change
Expand Up @@ -306,8 +306,8 @@ def compute_pvalue(self, data_x=None, data_y=None, data_z=None):
k_appr, theta_appr = self.get_kappa(uu_prod)
pvalue = 1 - stats.gamma.cdf(test_stat, k_appr, 0, theta_appr)
else:
self.null_samples = self.null_sample_spectral(uu_prod, size_u, Kx.shape[0])
pvalue = sum(self.null_samples > test_stat) / float(self.nullss)
null_samples = self.null_sample_spectral(uu_prod, size_u, Kx.shape[0])
pvalue = sum(null_samples > test_stat) / float(self.nullss)
return pvalue, test_stat

def kernel_matrix(self, data_x, data_y, data_z):
Expand Down

0 comments on commit b803533

Please sign in to comment.