Skip to content

Commit 2289100

Browse files
Merge pull request #26 from zhi-yi-huang/main
Fix Fisher Test
2 parents e2182f3 + 16fb4de commit 2289100

File tree

1 file changed

+2
-3
lines changed
  • causallearn/search/HiddenCausal/GIN

1 file changed

+2
-3
lines changed

causallearn/search/HiddenCausal/GIN/GIN.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,8 @@
2323

2424
def fisher_test(pvals):
2525
pvals = [pval if pval >= 1e-5 else 1e-5 for pval in pvals]
26-
return min(pvals)
27-
# fisher_stat = -2.0 * np.sum(np.log(pvals))
28-
# return 1 - chi2.cdf(fisher_stat, 2 * len(pvals))
26+
fisher_stat = -2.0 * np.sum(np.log(pvals))
27+
return 1 - chi2.cdf(fisher_stat, 2 * len(pvals))
2928

3029

3130
def GIN(data, indep_test=kci, alpha=0.05):

0 commit comments

Comments
 (0)