def test_mackwolfe(self): x = [[22, 23, 35], [60, 59, 54], [98, 78, 50], [60, 82, 59], [22, 44, 33], [23, 21, 25]] result, _ = som.test_mackwolfe(x, p=2) self.assertFalse(som.test_mackwolfe(x, p=20)) self.assertFalse(som.test_mackwolfe(x, p=0)) self.assertTrue(np.allclose(result, 0.0006812725))
def test_mackwolfe_nperm(self): x = [[22, 23, 35], [60, 59, 54], [98, 78, 50], [60, 82, 59], [22, 44, 33], [23, 21, 25]] _, stat = som.test_mackwolfe(x, n_perm=50) self.assertTrue(np.allclose(stat, 3.2024699769846983))