コード例 #1
0
ファイル: test_metrics.py プロジェクト: dvanatta/msmbuilder
 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
ファイル: test_metrics.py プロジェクト: dvanatta/msmbuilder
 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
ファイル: test_metrics.py プロジェクト: dvanatta/msmbuilder
 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
ファイル: test_metrics.py プロジェクト: dvanatta/msmbuilder
 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
ファイル: test_metrics.py プロジェクト: dvanatta/msmbuilder
 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
ファイル: test_metrics.py プロジェクト: dvanatta/msmbuilder
 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
ファイル: test_metrics.py プロジェクト: dvanatta/msmbuilder
 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
ファイル: test_metrics.py プロジェクト: dvanatta/msmbuilder
 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
ファイル: test_metrics.py プロジェクト: dvanatta/msmbuilder
 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
ファイル: test_metrics.py プロジェクト: dvanatta/msmbuilder
 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
ファイル: test_metrics.py プロジェクト: dvanatta/msmbuilder
 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
ファイル: test_metrics.py プロジェクト: dvanatta/msmbuilder
 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
ファイル: test_metrics.py プロジェクト: dvanatta/msmbuilder
 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)