@@ -26,7 +26,7 @@ class FastKCI_CInd(object):
2626 Working Paper.
2727
2828 """
29- def __init__ (self , K = 10 , J = 8 , alpha = 500 , epsilon = 1e-3 , eig_thresh = 1e-6 , trimming_thresh = 1e-3 , use_gp = False ):
29+ def __init__ (self , K = 10 , J = 8 , alpha = 500 , epsilon = 1e-3 , eig_thresh = 1e-6 , use_gp = False ):
3030 """
3131 Initialize the FastKCI_CInd object.
3232
@@ -44,7 +44,6 @@ def __init__(self, K=10, J=8, alpha=500, epsilon=1e-3, eig_thresh=1e-6, trimming
4444 self .alpha = alpha
4545 self .epsilon = epsilon
4646 self .eig_thresh = eig_thresh
47- self .trimming_thresh = trimming_thresh
4847 self .use_gp = use_gp
4948 self .nullss = 5000
5049
@@ -67,8 +66,7 @@ def compute_pvalue(self, data_x=None, data_y=None, data_z=None):
6766 self .data_z = data_z
6867 self .n = data_x .shape [0 ]
6968
70- Z_proposal = Parallel (n_jobs = - 1 )(delayed (self .partition_data )() for i in range (self .J ))
71- self .Z_proposal = zip (* Z_proposal )
69+ self .Z_proposal = Parallel (n_jobs = - 1 )(delayed (self .partition_data )() for i in range (self .J ))
7270 block_res = Parallel (n_jobs = - 1 )(delayed (self .pvalue_onblocks )(self .Z_proposal [i ]) for i in range (self .J ))
7371 test_stat , null_samples , log_likelihood = zip (* block_res )
7472
@@ -354,7 +352,7 @@ class FastKCI_UInd(object):
354352 "FastKCI: A fast Kernel-based Conditional Indepdence test with application to causal discovery",
355353 Working Paper.
356354 """
357- def __init__ (self , K = 10 , J = 8 , alpha = 500 , trimming_thresh = 1e-3 ):
355+ def __init__ (self , K = 10 , J = 8 , alpha = 500 ):
358356 """
359357 Construct the FastKCI_UInd model.
360358
@@ -363,12 +361,10 @@ def __init__(self, K=10, J=8, alpha=500, trimming_thresh=1e-3):
363361 K: Number of Gaussians that are assumed to be in the mixture
364362 J: Number of independent repittitions.
365363 alpha: Parameter for the Dirichlet distribution.
366- trimming_thresh: Threshold for trimming the propensity weights.
367364 """
368365 self .K = K
369366 self .J = J
370367 self .alpha = alpha
371- self .trimming_thresh = trimming_thresh
372368 self .nullss = 5000
373369 self .eig_thresh = 1e-5
374370
0 commit comments