Skip to content

Commit

Permalink
ENH: make unittest robust -- use medium ds, and 20 permutations inste…
Browse files Browse the repository at this point in the history
…ad of 10
  • Loading branch information
yarikoptic committed Dec 26, 2010
1 parent 8267a56 commit 918d916
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions mvpa/tests/test_stats_sp.py
Expand Up @@ -40,18 +40,18 @@ def testNullDistProbAny(self):

# test 'any' mode
from mvpa.measures.corrcoef import CorrCoef
ds = datasets['uni2small']
ds = datasets['uni2medium']

null = MCNullDist(permutations=10, tail='any')
null = MCNullDist(permutations=20, tail='any')
null.fit(CorrCoef(), ds)

# 100 and -100 should both have zero probability on their respective
# tails
pm100 = null.p([-100, 0, 0, 0, 0, 0])
p100 = null.p([100, 0, 0, 0, 0, 0])
pm100 = null.p([-100] + [0]*(ds.nfeatures-1))
p100 = null.p([100] + [0]*(ds.nfeatures-1))
assert_array_almost_equal(pm100, p100)

# With 10 samples isn't that easy to get reliable sampling for
# With 20 samples isn't that easy to get reliable sampling for
# non-parametric, so we can allow somewhat low significance
# ;-)
self.failUnless(pm100[0] <= 0.1)
Expand Down

0 comments on commit 918d916

Please sign in to comment.