Beispiel #1
0
 def test_braycurtis(self):
     reference = pdist(self.Xd, metric='braycurtis')
     testing = fast_pdist(self.Xd, metric='braycurtis')
     npt.assert_array_equal(reference, testing)
Beispiel #2
0
 def test_chebychev(self):
     reference = pdist(self.Xd, metric='chebychev')
     testing = fast_pdist(self.Xd, metric='chebychev')
     eq(reference, testing)
Beispiel #3
0
 def test_jaccard_2(self):
     reference = pdist(self.Xb, metric='jaccard')
     testing = fast_pdist(self.Xb, metric='jaccard')
     eq(reference, testing)
Beispiel #4
0
 def test_chebychev(self):
     reference = pdist(self.Xd, metric='chebychev')
     testing = fast_pdist(self.Xd, metric='chebychev')
     npt.assert_array_equal(reference, testing)
Beispiel #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)
Beispiel #6
0
 def test_sokalsneath(self):
     reference = pdist(self.Xb, metric='sokalsneath')
     testing = fast_pdist(self.Xb, metric='sokalsneath')
     npt.assert_array_equal(reference, testing)
Beispiel #7
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)
Beispiel #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)
Beispiel #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)
Beispiel #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)
Beispiel #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)
Beispiel #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)
Beispiel #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)
Beispiel #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)
Beispiel #15
0
 def test_kulsinski(self):
     reference = pdist(self.Xb, metric='kulsinski')
     testing = fast_pdist(self.Xb, metric='kulsinski')
     npt.assert_array_equal(reference, testing)
Beispiel #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)
Beispiel #17
0
 def test_rogerstanimoto(self):
     reference = pdist(self.Xb, metric='rogerstanimoto')
     testing = fast_pdist(self.Xb, metric='rogerstanimoto')
     npt.assert_array_equal(reference, testing)
Beispiel #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)
Beispiel #19
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)
Beispiel #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)
Beispiel #21
0
 def test_correlation(self):
     reference = pdist(self.Xd, metric='correlation')
     testing = fast_pdist(self.Xd, metric='correlation')
     npt.assert_array_equal(reference, testing)
Beispiel #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)
Beispiel #23
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)
Beispiel #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)
Beispiel #25
0
 def test_sqeuclidean(self):
     reference = pdist(self.Xd, metric='sqeuclidean')
     testing = fast_pdist(self.Xd, metric='sqeuclidean')
     eq(reference, testing)
Beispiel #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)
Beispiel #27
0
 def test_hamming_2(self):
     reference = pdist(self.Xb, metric='hamming')
     testing = fast_pdist(self.Xb, metric='hamming')
     eq(reference, testing)
Beispiel #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)
Beispiel #29
0
 def test_canberra(self):
     reference = pdist(self.Xd, metric='canberra')
     testing = fast_pdist(self.Xd, metric='canberra')
     eq(reference, testing)
Beispiel #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)
Beispiel #31
0
 def test_matching(self):
     reference = pdist(self.Xb, metric='matching')
     testing = fast_pdist(self.Xb, metric='matching')
     npt.assert_array_equal(reference, testing)
Beispiel #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)
Beispiel #33
0
 def test_dice(self):
     reference = pdist(self.Xb, metric='dice')
     testing = fast_pdist(self.Xb, metric='dice')
     npt.assert_array_equal(reference, testing)
Beispiel #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)
Beispiel #35
0
 def test_russellrao(self):
     reference = pdist(self.Xb, metric='russellrao')
     testing = fast_pdist(self.Xb, metric='russellrao')
     npt.assert_array_equal(reference, testing)
Beispiel #36
0
 def test_mahalanobis_1(self):
     reference = pdist(self.Xd, metric='mahalanobis')
     testing = fast_pdist(self.Xd, metric='mahalanobis')
     eq(reference, testing)
Beispiel #37
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)
Beispiel #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)
Beispiel #39
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)
Beispiel #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)
Beispiel #41
0
 def test_cityblock(self):
     reference = pdist(self.Xd, metric='cityblock')
     testing = fast_pdist(self.Xd, metric='cityblock')
     npt.assert_array_equal(reference, testing)
Beispiel #42
0
 def test_cosine(self):
     reference = pdist(self.Xd, metric='cosine')
     testing = fast_pdist(self.Xd, metric='cosine')
     eq(reference, testing)
Beispiel #43
0
 def test_sqeuclidean(self):
     reference = pdist(self.Xd, metric='sqeuclidean')
     testing = fast_pdist(self.Xd, metric='sqeuclidean')
     npt.assert_array_equal(reference, testing)
Beispiel #44
0
 def test_cityblock(self):
     reference = pdist(self.Xd, metric='cityblock')
     testing = fast_pdist(self.Xd, metric='cityblock')
     eq(reference, testing)
Beispiel #45
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)
Beispiel #46
0
 def test_correlation(self):
     reference = pdist(self.Xd, metric='correlation')
     testing = fast_pdist(self.Xd, metric='correlation')
     eq(reference, testing)
Beispiel #47
0
 def test_canberra(self):
     reference = pdist(self.Xd, metric='canberra')
     testing = fast_pdist(self.Xd, metric='canberra')
     npt.assert_array_equal(reference, testing)
Beispiel #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)