예제 #1
0
 def test_russellrao(self):
     reference = cdist(self.Xb1, self.Xb2, metric='russellrao')
     testing = fast_cdist(self.Xb1, self.Xb2, metric='russellrao')
     eq(reference, testing)
예제 #2
0
 def test_sokalsneath(self):
     reference = cdist(self.Xb1, self.Xb2, metric='sokalsneath')
     testing = fast_cdist(self.Xb1, self.Xb2, metric='sokalsneath')
     eq(reference, testing)
예제 #3
0
 def test_mahalanobis_2(self):
     VI = np.random.randn(self.Xd1.shape[0], self.Xd1.shape[0])
     reference = cdist(self.Xd1, self.Xd2, metric='mahalanobis', VI=VI)
     testing = fast_cdist(self.Xd1, self.Xd2, metric='mahalanobis', VI=VI)
     npt.assert_array_equal(reference, testing)
예제 #4
0
 def test_dice(self):
     reference = cdist(self.Xb1, self.Xb2, metric='dice')
     testing = fast_cdist(self.Xb1, self.Xb2, metric='dice')
     eq(reference, testing)
예제 #5
0
 def test_canberra(self):
     reference = cdist(self.Xd1, self.Xd2, metric='canberra')
     testing = fast_cdist(self.Xd1, self.Xd2, metric='canberra')
     npt.assert_array_equal(reference, testing)
예제 #6
0
 def test_dice(self):
     reference = cdist(self.Xb1, self.Xb2, metric='dice')
     testing = fast_cdist(self.Xb1, self.Xb2, metric='dice')
     npt.assert_array_equal(reference, testing)
예제 #7
0
 def test_hamming_2(self):
     reference = cdist(self.Xb1, self.Xb2, metric='hamming')
     testing = fast_cdist(self.Xb1, self.Xb2, metric='hamming')
     npt.assert_array_equal(reference, testing)
예제 #8
0
 def test_sqeuclidean(self):
     reference = cdist(self.Xd1, self.Xd2, metric='sqeuclidean')
     testing = fast_cdist(self.Xd1, self.Xd2, metric='sqeuclidean')
     npt.assert_array_equal(reference, testing)
예제 #9
0
 def test_sqeuclidean(self):
     reference = cdist(self.Xd1, self.Xd2, metric='sqeuclidean')
     testing = fast_cdist(self.Xd1, self.Xd2, metric='sqeuclidean')
     npt.assert_array_equal(reference, testing)
예제 #10
0
 def test_chebychev(self):
     reference = cdist(self.Xd1, self.Xd2, metric='chebychev')
     testing = fast_cdist(self.Xd1, self.Xd2, metric='chebychev')
     npt.assert_array_equal(reference, testing)
예제 #11
0
 def test_correlation(self):
     reference = cdist(self.Xd1, self.Xd2, metric='correlation')
     testing = fast_cdist(self.Xd1, self.Xd2, metric='correlation')
     npt.assert_array_equal(reference, testing)
예제 #12
0
 def test_cityblock(self):
     reference = cdist(self.Xd1, self.Xd2, metric='cityblock')
     testing = fast_cdist(self.Xd1, self.Xd2, metric='cityblock')
     npt.assert_array_equal(reference, testing)
예제 #13
0
 def test_minkowski(self):
     p = np.random.randint(10)
     reference = cdist(self.Xd1, self.Xd2, metric='minkowski', p=p)
     testing = fast_cdist(self.Xd1, self.Xd2, metric='minkowski', p=p)
     npt.assert_array_equal(reference, testing)
예제 #14
0
 def test_mahalanobis_2(self):
     VI = np.random.randn(self.Xd1.shape[0], self.Xd1.shape[0])
     reference = cdist(self.Xd1, self.Xd2, metric='mahalanobis', VI=VI)
     testing = fast_cdist(self.Xd1, self.Xd2, metric='mahalanobis', VI=VI)
     npt.assert_array_equal(reference, testing)
예제 #15
0
 def test_jaccard_2(self):
     reference = cdist(self.Xb1, self.Xb2, metric='jaccard')
     testing = fast_cdist(self.Xb1, self.Xb2, metric='jaccard')
     npt.assert_array_equal(reference, testing)
예제 #16
0
 def test_cityblock(self):
     reference = cdist(self.Xd1, self.Xd2, metric='cityblock')
     testing = fast_cdist(self.Xd1, self.Xd2, metric='cityblock')
     npt.assert_array_equal(reference, testing)
예제 #17
0
 def test_canberra(self):
     reference = cdist(self.Xd1, self.Xd2, metric='canberra')
     testing = fast_cdist(self.Xd1, self.Xd2, metric='canberra')
     npt.assert_array_equal(reference, testing)
예제 #18
0
 def test_hamming_2(self):
     reference = cdist(self.Xb1, self.Xb2, metric='hamming')
     testing = fast_cdist(self.Xb1, self.Xb2, metric='hamming')
     npt.assert_array_equal(reference, testing)
예제 #19
0
 def test_braycurtis(self):
     reference = cdist(self.Xd1, self.Xd2, metric='braycurtis')
     testing = fast_cdist(self.Xd1, self.Xd2, metric='braycurtis')
     npt.assert_array_equal(reference, testing)
예제 #20
0
 def test_matching(self):
     reference = cdist(self.Xb1, self.Xb2, metric='matching')
     testing = fast_cdist(self.Xb1, self.Xb2, metric='matching')
     npt.assert_array_equal(reference, testing)
예제 #21
0
 def test_matching(self):
     reference = cdist(self.Xb1, self.Xb2, metric='matching')
     testing = fast_cdist(self.Xb1, self.Xb2, metric='matching')
     npt.assert_array_equal(reference, testing)
예제 #22
0
 def test_russellrao(self):
     reference = cdist(self.Xb1, self.Xb2, metric='russellrao')
     testing = fast_cdist(self.Xb1, self.Xb2, metric='russellrao')
     npt.assert_array_equal(reference, testing)
예제 #23
0
 def test_kulsinski(self):
     reference = cdist(self.Xb1, self.Xb2, metric='kulsinski')
     testing = fast_cdist(self.Xb1, self.Xb2, metric='kulsinski')
     npt.assert_array_equal(reference, testing)
예제 #24
0
 def test_kulsinski(self):
     reference = cdist(self.Xb1, self.Xb2, metric='kulsinski')
     testing = fast_cdist(self.Xb1, self.Xb2, metric='kulsinski')
     eq(reference, testing)
예제 #25
0
 def test_dice(self):
     reference = cdist(self.Xb1, self.Xb2, metric='dice')
     testing = fast_cdist(self.Xb1, self.Xb2, metric='dice')
     npt.assert_array_equal(reference, testing)
예제 #26
0
 def test_rogerstanimoto(self):
     reference = cdist(self.Xb1, self.Xb2, metric='rogerstanimoto')
     testing = fast_cdist(self.Xb1, self.Xb2, metric='rogerstanimoto')
     eq(reference, testing)
예제 #27
0
 def test_rogerstanimoto(self):
     reference = cdist(self.Xb1, self.Xb2, metric='rogerstanimoto')
     testing = fast_cdist(self.Xb1, self.Xb2, metric='rogerstanimoto')
     npt.assert_array_equal(reference, testing)
예제 #28
0
 def test_sokalmichener(self):
     reference = cdist(self.Xb1, self.Xb2, metric='sokalmichener')
     testing = fast_cdist(self.Xb1, self.Xb2, metric='sokalmichener')
     eq(reference, testing)
예제 #29
0
 def test_russellrao(self):
     reference = cdist(self.Xb1, self.Xb2, metric='russellrao')
     testing = fast_cdist(self.Xb1, self.Xb2, metric='russellrao')
     npt.assert_array_equal(reference, testing)
예제 #30
0
 def test_seuclidean_2(self):
     V = np.random.randn(self.Xd1.shape[1])
     reference = cdist(self.Xd1, self.Xd2, metric='seuclidean', V=V)
     testing = fast_cdist(self.Xd1, self.Xd2, metric='seuclidean', V=V)
     npt.assert_array_equal(reference, testing)
예제 #31
0
 def test_sokalsneath(self):
     reference = cdist(self.Xb1, self.Xb2, metric='sokalsneath')
     testing = fast_cdist(self.Xb1, self.Xb2, metric='sokalsneath')
     npt.assert_array_equal(reference, testing)
예제 #32
0
 def test_minkowski(self):
     p = np.random.randint(10)
     reference = cdist(self.Xd1, self.Xd2, metric='minkowski', p=p)
     testing = fast_cdist(self.Xd1, self.Xd2, metric='minkowski', p=p)
     npt.assert_array_equal(reference, testing)
예제 #33
0
 def test_sqeuclidean(self):
     reference = cdist(self.Xd1, self.Xd2, metric='sqeuclidean')
     testing = fast_cdist(self.Xd1, self.Xd2, metric='sqeuclidean')
     eq(reference, testing)
예제 #34
0
 def test_correlation(self):
     reference = cdist(self.Xd1, self.Xd2, metric='correlation')
     testing = fast_cdist(self.Xd1, self.Xd2, metric='correlation')
     npt.assert_array_equal(reference, testing)
예제 #35
0
 def test_chebychev(self):
     reference = cdist(self.Xd1, self.Xd2, metric='chebychev')
     testing = fast_cdist(self.Xd1, self.Xd2, metric='chebychev')
     eq(reference, testing)
예제 #36
0
 def test_chebychev(self):
     reference = cdist(self.Xd1, self.Xd2, metric='chebychev')
     testing = fast_cdist(self.Xd1, self.Xd2, metric='chebychev')
     npt.assert_array_equal(reference, testing)
예제 #37
0
 def test_hamming_2(self):
     reference = cdist(self.Xb1, self.Xb2, metric='hamming')
     testing = fast_cdist(self.Xb1, self.Xb2, metric='hamming')
     eq(reference, testing)
예제 #38
0
 def test_jaccard_2(self):
     reference = cdist(self.Xb1, self.Xb2, metric='jaccard')
     testing = fast_cdist(self.Xb1, self.Xb2, metric='jaccard')
     npt.assert_array_equal(reference, testing)
예제 #39
0
 def test_jaccard_2(self):
     reference = cdist(self.Xb1, self.Xb2, metric='jaccard')
     testing = fast_cdist(self.Xb1, self.Xb2, metric='jaccard')
     eq(reference, testing)
예제 #40
0
 def test_braycurtis(self):
     reference = cdist(self.Xd1, self.Xd2, metric='braycurtis')
     testing = fast_cdist(self.Xd1, self.Xd2, metric='braycurtis')
     npt.assert_array_equal(reference, testing)
예제 #41
0
 def test_canberra(self):
     reference = cdist(self.Xd1, self.Xd2, metric='canberra')
     testing = fast_cdist(self.Xd1, self.Xd2, metric='canberra')
     eq(reference, testing)
예제 #42
0
 def test_kulsinski(self):
     reference = cdist(self.Xb1, self.Xb2, metric='kulsinski')
     testing = fast_cdist(self.Xb1, self.Xb2, metric='kulsinski')
     npt.assert_array_equal(reference, testing)
예제 #43
0
 def test_braycurtis(self):
     reference = cdist(self.Xd1, self.Xd2, metric='braycurtis')
     testing = fast_cdist(self.Xd1, self.Xd2, metric='braycurtis')
     eq(reference, testing)
예제 #44
0
 def test_rogerstanimoto(self):
     reference = cdist(self.Xb1, self.Xb2, metric='rogerstanimoto')
     testing = fast_cdist(self.Xb1, self.Xb2, metric='rogerstanimoto')
     npt.assert_array_equal(reference, testing)
예제 #45
0
 def test_matching(self):
     reference = cdist(self.Xb1, self.Xb2, metric='matching')
     testing = fast_cdist(self.Xb1, self.Xb2, metric='matching')
     eq(reference, testing)
예제 #46
0
 def test_sokalsneath(self):
     reference = cdist(self.Xb1, self.Xb2, metric='sokalsneath')
     testing = fast_cdist(self.Xb1, self.Xb2, metric='sokalsneath')
     npt.assert_array_equal(reference, testing)
예제 #47
0
 def test_seuclidean_2(self):
     V = np.random.randn(self.Xd1.shape[1])
     reference = cdist(self.Xd1, self.Xd2, metric='seuclidean', V=V)
     testing = fast_cdist(self.Xd1, self.Xd2, metric='seuclidean', V=V)
     npt.assert_array_equal(reference, testing)