Beispiel #1
0
    def test_distance_matrix_permutation_test_alt_stat(self):
        def fake_stat_test(a, b, tails=None):
            return 42., 42.

        m = array([[0, 1, 3], [1, 2, 4], [3, 4, 5]])
        self.assertEqual(distance_matrix_permutation_test(m,\
            [(0,0),(0,1),(0,2)],n=5,f=fake_stat_test),(42.,42.,0.))
Beispiel #2
0
 def test_distance_matrix_permutation_test_return_scores(self):
     """ return_scores=True functions as expected """
     # use alt statistical test to make results simple
     def fake_stat_test(a,b,tails=None):
         return 42.,42.
     m = array([[0,1,3],[1,2,4],[3,4,5]])
     self.assertEqual(distance_matrix_permutation_test(\
         m,[(0,0),(0,1),(0,2)],\
         n=5,f=fake_stat_test,return_scores=True),(42.,42.,0.,[42.]*5))
Beispiel #3
0
    def test_distance_matrix_permutation_test_return_scores(self):
        """ return_scores=True functions as expected """

        # use alt statistical test to make results simple
        def fake_stat_test(a, b, tails=None):
            return 42., 42.

        m = array([[0, 1, 3], [1, 2, 4], [3, 4, 5]])
        self.assertEqual(distance_matrix_permutation_test(\
            m,[(0,0),(0,1),(0,2)],\
            n=5,f=fake_stat_test,return_scores=True),(42.,42.,0.,[42.]*5))
Beispiel #4
0
 def test_distance_matrix_permutation_test_alt_stat(self):
     def fake_stat_test(a,b,tails=None):
         return 42.,42.
     m = array([[0,1,3],[1,2,4],[3,4,5]])
     self.assertEqual(distance_matrix_permutation_test(m,\
         [(0,0),(0,1),(0,2)],n=5,f=fake_stat_test),(42.,42.,0.))
Beispiel #5
0
 def make_result_list(*args, **kwargs):
     return [distance_matrix_permutation_test(*args)[2] for i in range(10)]
Beispiel #6
0
 def make_result_list(*args, **kwargs):
     return [distance_matrix_permutation_test(*args,**kwargs)[2] \
         for i in range(10)]