Exemple #1
0
def test_efdr():
    # generate the data
    n = 100000
    x = np.random.randn(n)
    x[:3000] += 3
    #
    # make the tests
    efdr = ENN(x)
    np.testing.assert_array_less(efdr.fdr(3.0), 0.15)
    np.testing.assert_array_less(-efdr.threshold(alpha=0.05), -3)
    np.testing.assert_array_less(-efdr.uncorrected_threshold(alpha=0.001), -3)
Exemple #2
0
import numpy as np
x = np.c_[np.random.normal(size=1e4), 
          np.random.normal(scale=4, size=1e4)]

from nipy.neurospin.utils.emp_null import ENN
enn = ENN(x)
enn.threshold(verbose=True)