def test_braycurtis(self): reference = pdist(self.Xd, metric='braycurtis') testing = fast_pdist(self.Xd, metric='braycurtis') npt.assert_array_equal(reference, testing)
def test_chebychev(self): reference = pdist(self.Xd, metric='chebychev') testing = fast_pdist(self.Xd, metric='chebychev') eq(reference, testing)
def test_jaccard_2(self): reference = pdist(self.Xb, metric='jaccard') testing = fast_pdist(self.Xb, metric='jaccard') eq(reference, testing)
def test_chebychev(self): reference = pdist(self.Xd, metric='chebychev') testing = fast_pdist(self.Xd, metric='chebychev') npt.assert_array_equal(reference, testing)
def test_matching(self): reference = pdist(self.Xb, metric='matching') testing = fast_pdist(self.Xb, metric='matching') npt.assert_array_equal(reference, testing)
def test_sokalsneath(self): reference = pdist(self.Xb, metric='sokalsneath') testing = fast_pdist(self.Xb, metric='sokalsneath') npt.assert_array_equal(reference, testing)
def test_minkowski(self): p = np.random.randint(10) reference = pdist(self.Xd, metric='minkowski', p=p) testing = fast_pdist(self.Xd, metric='minkowski', p=p) npt.assert_array_equal(reference, testing)
def test_seuclidean_2(self): V = np.random.randn(self.Xd.shape[1]) reference = pdist(self.Xd, metric='seuclidean', V=V) testing = fast_pdist(self.Xd, metric='seuclidean', V=V) npt.assert_array_equal(reference, testing)
def test_mahalanobis_1(self): reference = pdist(self.Xd, metric='mahalanobis') testing = fast_pdist(self.Xd, metric='mahalanobis') npt.assert_array_equal(reference, testing)
def test_russellrao(self): reference = pdist(self.Xb, metric='russellrao') testing = fast_pdist(self.Xb, metric='russellrao') npt.assert_array_equal(reference, testing)
def test_rogerstanimoto(self): reference = pdist(self.Xb, metric='rogerstanimoto') testing = fast_pdist(self.Xb, metric='rogerstanimoto') npt.assert_array_equal(reference, testing)
def test_dice(self): reference = pdist(self.Xb, metric='dice') testing = fast_pdist(self.Xb, metric='dice') npt.assert_array_equal(reference, testing)
def test_kulsinski(self): reference = pdist(self.Xb, metric='kulsinski') testing = fast_pdist(self.Xb, metric='kulsinski') npt.assert_array_equal(reference, testing)
def test_mahalanobis_2(self): VI = np.random.randn(self.Xd.shape[0], self.Xd.shape[0]) reference = pdist(self.Xd, metric='mahalanobis', VI=VI) testing = fast_pdist(self.Xd, metric='mahalanobis', VI=VI) npt.assert_array_equal(reference, testing)
def test_cityblock(self): reference = pdist(self.Xd, metric='cityblock') testing = fast_pdist(self.Xd, metric='cityblock') npt.assert_array_equal(reference, testing)
def test_correlation(self): reference = pdist(self.Xd, metric='correlation') testing = fast_pdist(self.Xd, metric='correlation') npt.assert_array_equal(reference, testing)
def test_jaccard_2(self): reference = pdist(self.Xb, metric='jaccard') testing = fast_pdist(self.Xb, metric='jaccard') npt.assert_array_equal(reference, testing)
def test_sqeuclidean(self): reference = pdist(self.Xd, metric='sqeuclidean') testing = fast_pdist(self.Xd, metric='sqeuclidean') npt.assert_array_equal(reference, testing)
def test_sqeuclidean(self): reference = pdist(self.Xd, metric='sqeuclidean') testing = fast_pdist(self.Xd, metric='sqeuclidean') eq(reference, testing)
def test_hamming_2(self): reference = pdist(self.Xb, metric='hamming') testing = fast_pdist(self.Xb, metric='hamming') eq(reference, testing)
def test_hamming_2(self): reference = pdist(self.Xb, metric='hamming') testing = fast_pdist(self.Xb, metric='hamming') npt.assert_array_equal(reference, testing)
def test_canberra(self): reference = pdist(self.Xd, metric='canberra') testing = fast_pdist(self.Xd, metric='canberra') eq(reference, testing)
def test_canberra(self): reference = pdist(self.Xd, metric='canberra') testing = fast_pdist(self.Xd, metric='canberra') npt.assert_array_equal(reference, testing)
def test_seuclidean_2(self): V = np.random.randn(self.Xd.shape[1]) reference = pdist(self.Xd, metric='seuclidean', V=V) testing = fast_pdist(self.Xd, metric='seuclidean', V=V) eq(reference, testing)
def test_mahalanobis_1(self): reference = pdist(self.Xd, metric='mahalanobis') testing = fast_pdist(self.Xd, metric='mahalanobis') eq(reference, testing)
def test_mahalanobis_2(self): VI = np.random.randn(self.Xd.shape[0], self.Xd.shape[0]) reference = pdist(self.Xd, metric='mahalanobis', VI=VI) testing = fast_pdist(self.Xd, metric='mahalanobis', VI=VI) eq(reference, testing)
def test_minkowski(self): p = np.random.randint(10) reference = pdist(self.Xd, metric='minkowski', p=p) testing = fast_pdist(self.Xd, metric='minkowski', p=p) eq(reference, testing)
def test_cosine(self): reference = pdist(self.Xd, metric='cosine') testing = fast_pdist(self.Xd, metric='cosine') eq(reference, testing)
def test_cityblock(self): reference = pdist(self.Xd, metric='cityblock') testing = fast_pdist(self.Xd, metric='cityblock') eq(reference, testing)
def test_correlation(self): reference = pdist(self.Xd, metric='correlation') testing = fast_pdist(self.Xd, metric='correlation') eq(reference, testing)