Skip to content

Commit 095ab62

Browse files
authored
Merge pull request #1 from MrHuff/patch-2
update calls
2 parents e2f70bd + 5c62508 commit 095ab62

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

weak_conditional_independence_testing/TwoStepCondTestObject.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -87,12 +87,12 @@ def compute_matrices_for_gradient_totalcverr(self, train_x, train_y, train_z):
8787
if self.kernelY_use_median:
8888
sigmay = self.kernelY.get_sigma_median_heuristic(train_y)
8989
self.kernelY.set_width(float(sigmay))
90-
kf = KFold(self.num_samples, n_folds=self.K_folds)
90+
kf = KFold( n_splits=self.K_folds)
9191
matrix_results = [[[None] for _ in range(self.K_folds)]for _ in range(8)]
9292
# xx=[[None]*10]*6 will give the same id to xx[0][0] and xx[1][0] etc. as
9393
# this command simply copied [None] many times. But the above gives different ids.
9494
count = 0
95-
for train_index, test_index in kf:
95+
for train_index, test_index in kf.split(np.ones((self.num_samples,1))):
9696
X_tr, X_tst = train_x[train_index], train_x[test_index]
9797
Y_tr, Y_tst = train_y[train_index], train_y[test_index]
9898
Z_tr, Z_tst = train_z[train_index], train_z[test_index]

0 commit comments

Comments
 (0)