Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
confounding test added
  • Loading branch information
kbudhath committed Nov 27, 2017
1 parent ce9411c commit 23673ee
Showing 1 changed file with 24 additions and 2 deletions.
26 changes: 24 additions & 2 deletions test_synthetic.py
Expand Up @@ -11,7 +11,6 @@
import time

import numpy as np
from stat_tests import friedman_test, nemenyi_multitest, bonferroni_dunn_test

from cisc import cisc
from crisp import crisp
Expand Down Expand Up @@ -677,8 +676,31 @@ def test_accuracy_alpha():
sys.stdout.flus()


def test_confounding():
nsim = 100
size = 1000
suppfzx = range(-7, 8)
suppfzy = range(-7, 8)
z = generate_X("uniform", size)
suppz = list(set(z))

fzx = map_randomly(suppz, suppfzx)
fzy = map_randomly(suppz, suppfzy)

nx = generate_additive_N(size)
ny = generate_additive_N(size)

x = [fzx[z[i]] + nx[i] for i in xrange(size)]
y = [fzy[z[i]] + ny[i] for i in xrange(size)]

print crisp(x, y)
print crisp(z, x)
print crisp(z, y)


if __name__ == "__main__":
test_sample_size()
test_confounding()
# test_sample_size()
# test_accuracy()
# test_accuracy_alpha()
# test_hypercompression()

0 comments on commit 23673ee

Please sign in to comment.