本文整理汇总了Python中msmbuilder.metrics.core.fast_pdist函数的典型用法代码示例。如果您正苦于以下问题:Python fast_pdist函数的具体用法?Python fast_pdist怎么用?Python fast_pdist使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了fast_pdist函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_mahalanobis_1
def test_mahalanobis_1(self):
reference = pdist(self.Xd, metric='mahalanobis')
testing = fast_pdist(self.Xd, metric='mahalanobis')
eq(reference, testing)
示例2: test_chebychev
def test_chebychev(self):
reference = pdist(self.Xd, metric='chebychev')
testing = fast_pdist(self.Xd, metric='chebychev')
npt.assert_array_equal(reference, testing)
示例3: test_jaccard_2
def test_jaccard_2(self):
reference = pdist(self.Xb, metric='jaccard')
testing = fast_pdist(self.Xb, metric='jaccard')
npt.assert_array_equal(reference, testing)
示例4: test_minkowski
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)
示例5: test_correlation
def test_correlation(self):
reference = pdist(self.Xd, metric='correlation')
testing = fast_pdist(self.Xd, metric='correlation')
npt.assert_array_equal(reference, testing)
示例6: test_sokalsneath
def test_sokalsneath(self):
reference = pdist(self.Xb, metric='sokalsneath')
testing = fast_pdist(self.Xb, metric='sokalsneath')
npt.assert_array_equal(reference, testing)
示例7: test_mahalanobis_1
def test_mahalanobis_1(self):
reference = pdist(self.Xd, metric='mahalanobis')
testing = fast_pdist(self.Xd, metric='mahalanobis')
npt.assert_array_equal(reference, testing)
示例8: test_sqeuclidean
def test_sqeuclidean(self):
reference = pdist(self.Xd, metric='sqeuclidean')
testing = fast_pdist(self.Xd, metric='sqeuclidean')
eq(reference, testing)
示例9: test_chebychev
def test_chebychev(self):
reference = pdist(self.Xd, metric='chebychev')
testing = fast_pdist(self.Xd, metric='chebychev')
eq(reference, testing)
示例10: test_cityblock
def test_cityblock(self):
reference = pdist(self.Xd, metric='cityblock')
testing = fast_pdist(self.Xd, metric='cityblock')
eq(reference, testing)
示例11: test_correlation
def test_correlation(self):
reference = pdist(self.Xd, metric='correlation')
testing = fast_pdist(self.Xd, metric='correlation')
eq(reference, testing)
示例12: test_cosine
def test_cosine(self):
reference = pdist(self.Xd, metric='cosine')
testing = fast_pdist(self.Xd, metric='cosine')
eq(reference, testing)
示例13: test_minkowski
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)
示例14: test_mahalanobis_2
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)
示例15: test_rogerstanimoto
def test_rogerstanimoto(self):
reference = pdist(self.Xb, metric='rogerstanimoto')
testing = fast_pdist(self.Xb, metric='rogerstanimoto')
npt.assert_array_equal(reference, testing)