def test_braycurtis(self):
     reference = pdist(self.Xd, metric='braycurtis')
     testing = fast_pdist(self.Xd, metric='braycurtis')
     npt.assert_array_equal(reference, testing)
Exemple #2
0
 def test_chebychev(self):
     reference = pdist(self.Xd, metric='chebychev')
     testing = fast_pdist(self.Xd, metric='chebychev')
     eq(reference, testing)
Exemple #3
0
 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)
Exemple #5
0
 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)
Exemple #8
0
 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)
Exemple #9
0
 def test_mahalanobis_1(self):
     reference = pdist(self.Xd, metric='mahalanobis')
     testing = fast_pdist(self.Xd, metric='mahalanobis')
     npt.assert_array_equal(reference, testing)
Exemple #10
0
 def test_russellrao(self):
     reference = pdist(self.Xb, metric='russellrao')
     testing = fast_pdist(self.Xb, metric='russellrao')
     npt.assert_array_equal(reference, testing)
Exemple #11
0
 def test_sokalsneath(self):
     reference = pdist(self.Xb, metric='sokalsneath')
     testing = fast_pdist(self.Xb, metric='sokalsneath')
     npt.assert_array_equal(reference, testing)
Exemple #12
0
 def test_rogerstanimoto(self):
     reference = pdist(self.Xb, metric='rogerstanimoto')
     testing = fast_pdist(self.Xb, metric='rogerstanimoto')
     npt.assert_array_equal(reference, testing)
Exemple #13
0
 def test_dice(self):
     reference = pdist(self.Xb, metric='dice')
     testing = fast_pdist(self.Xb, metric='dice')
     npt.assert_array_equal(reference, testing)
Exemple #14
0
 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_kulsinski(self):
     reference = pdist(self.Xb, metric='kulsinski')
     testing = fast_pdist(self.Xb, metric='kulsinski')
     npt.assert_array_equal(reference, testing)
Exemple #16
0
 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_rogerstanimoto(self):
     reference = pdist(self.Xb, metric='rogerstanimoto')
     testing = fast_pdist(self.Xb, metric='rogerstanimoto')
     npt.assert_array_equal(reference, testing)
Exemple #18
0
 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_mahalanobis_1(self):
     reference = pdist(self.Xd, metric='mahalanobis')
     testing = fast_pdist(self.Xd, metric='mahalanobis')
     npt.assert_array_equal(reference, testing)
Exemple #20
0
 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)
Exemple #22
0
 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)
Exemple #24
0
 def test_sqeuclidean(self):
     reference = pdist(self.Xd, metric='sqeuclidean')
     testing = fast_pdist(self.Xd, metric='sqeuclidean')
     npt.assert_array_equal(reference, testing)
Exemple #25
0
 def test_sqeuclidean(self):
     reference = pdist(self.Xd, metric='sqeuclidean')
     testing = fast_pdist(self.Xd, metric='sqeuclidean')
     eq(reference, testing)
Exemple #26
0
 def test_chebychev(self):
     reference = pdist(self.Xd, metric='chebychev')
     testing = fast_pdist(self.Xd, metric='chebychev')
     npt.assert_array_equal(reference, testing)
Exemple #27
0
 def test_hamming_2(self):
     reference = pdist(self.Xb, metric='hamming')
     testing = fast_pdist(self.Xb, metric='hamming')
     eq(reference, testing)
Exemple #28
0
 def test_hamming_2(self):
     reference = pdist(self.Xb, metric='hamming')
     testing = fast_pdist(self.Xb, metric='hamming')
     npt.assert_array_equal(reference, testing)
Exemple #29
0
 def test_canberra(self):
     reference = pdist(self.Xd, metric='canberra')
     testing = fast_pdist(self.Xd, metric='canberra')
     eq(reference, testing)
Exemple #30
0
 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_matching(self):
     reference = pdist(self.Xb, metric='matching')
     testing = fast_pdist(self.Xb, metric='matching')
     npt.assert_array_equal(reference, testing)
Exemple #32
0
 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_dice(self):
     reference = pdist(self.Xb, metric='dice')
     testing = fast_pdist(self.Xb, metric='dice')
     npt.assert_array_equal(reference, testing)
Exemple #34
0
 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_russellrao(self):
     reference = pdist(self.Xb, metric='russellrao')
     testing = fast_pdist(self.Xb, metric='russellrao')
     npt.assert_array_equal(reference, testing)
Exemple #36
0
 def test_mahalanobis_1(self):
     reference = pdist(self.Xd, metric='mahalanobis')
     testing = fast_pdist(self.Xd, metric='mahalanobis')
     eq(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)
Exemple #38
0
 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_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)
Exemple #40
0
 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_cityblock(self):
     reference = pdist(self.Xd, metric='cityblock')
     testing = fast_pdist(self.Xd, metric='cityblock')
     npt.assert_array_equal(reference, testing)
Exemple #42
0
 def test_cosine(self):
     reference = pdist(self.Xd, metric='cosine')
     testing = fast_pdist(self.Xd, metric='cosine')
     eq(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)
Exemple #44
0
 def test_cityblock(self):
     reference = pdist(self.Xd, metric='cityblock')
     testing = fast_pdist(self.Xd, metric='cityblock')
     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)
Exemple #46
0
 def test_correlation(self):
     reference = pdist(self.Xd, metric='correlation')
     testing = fast_pdist(self.Xd, metric='correlation')
     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)
Exemple #48
0
 def test_braycurtis(self):
     reference = pdist(self.Xd, metric='braycurtis')
     testing = fast_pdist(self.Xd, metric='braycurtis')
     npt.assert_array_equal(reference, testing)