本文整理汇总了Python中msmbuilder.metrics.core.fast_pdist函数的典型用法代码示例。如果您正苦于以下问题:Python fast_pdist函数的具体用法?Python fast_pdist怎么用?Python fast_pdist使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了fast_pdist函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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)
开发者ID:dvanatta,项目名称:msmbuilder,代码行数:4,代码来源:test_metrics.py
示例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)
开发者ID:jimsnyderjr,项目名称:msmbuilder,代码行数:4,代码来源:test_metrics.py
示例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)
开发者ID:jimsnyderjr,项目名称:msmbuilder,代码行数:4,代码来源:test_metrics.py
示例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)
开发者ID:jimsnyderjr,项目名称:msmbuilder,代码行数:5,代码来源:test_metrics.py
示例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)
开发者ID:jimsnyderjr,项目名称:msmbuilder,代码行数:4,代码来源:test_metrics.py
示例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)
开发者ID:jimsnyderjr,项目名称:msmbuilder,代码行数:4,代码来源:test_metrics.py
示例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)
开发者ID:jimsnyderjr,项目名称:msmbuilder,代码行数:4,代码来源:test_metrics.py
示例8: test_sqeuclidean
def test_sqeuclidean(self):
reference = pdist(self.Xd, metric='sqeuclidean')
testing = fast_pdist(self.Xd, metric='sqeuclidean')
eq(reference, testing)
开发者ID:dvanatta,项目名称:msmbuilder,代码行数:4,代码来源:test_metrics.py
示例9: test_chebychev
def test_chebychev(self):
reference = pdist(self.Xd, metric='chebychev')
testing = fast_pdist(self.Xd, metric='chebychev')
eq(reference, testing)
开发者ID:dvanatta,项目名称:msmbuilder,代码行数:4,代码来源:test_metrics.py
示例10: test_cityblock
def test_cityblock(self):
reference = pdist(self.Xd, metric='cityblock')
testing = fast_pdist(self.Xd, metric='cityblock')
eq(reference, testing)
开发者ID:dvanatta,项目名称:msmbuilder,代码行数:4,代码来源:test_metrics.py
示例11: test_correlation
def test_correlation(self):
reference = pdist(self.Xd, metric='correlation')
testing = fast_pdist(self.Xd, metric='correlation')
eq(reference, testing)
开发者ID:dvanatta,项目名称:msmbuilder,代码行数:4,代码来源:test_metrics.py
示例12: test_cosine
def test_cosine(self):
reference = pdist(self.Xd, metric='cosine')
testing = fast_pdist(self.Xd, metric='cosine')
eq(reference, testing)
开发者ID:dvanatta,项目名称:msmbuilder,代码行数:4,代码来源:test_metrics.py
示例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)
开发者ID:dvanatta,项目名称:msmbuilder,代码行数:5,代码来源:test_metrics.py
示例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)
开发者ID:dvanatta,项目名称:msmbuilder,代码行数:5,代码来源:test_metrics.py
示例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)
开发者ID:jimsnyderjr,项目名称:msmbuilder,代码行数:4,代码来源:test_metrics.py
示例16: test_hamming_2
def test_hamming_2(self):
reference = pdist(self.Xb, metric='hamming')
testing = fast_pdist(self.Xb, metric='hamming')
eq(reference, testing)
开发者ID:dvanatta,项目名称:msmbuilder,代码行数:4,代码来源:test_metrics.py
示例17: test_russellrao
def test_russellrao(self):
reference = pdist(self.Xb, metric='russellrao')
testing = fast_pdist(self.Xb, metric='russellrao')
npt.assert_array_equal(reference, testing)
开发者ID:jimsnyderjr,项目名称:msmbuilder,代码行数:4,代码来源:test_metrics.py
示例18: test_jaccard_2
def test_jaccard_2(self):
reference = pdist(self.Xb, metric='jaccard')
testing = fast_pdist(self.Xb, metric='jaccard')
eq(reference, testing)
开发者ID:dvanatta,项目名称:msmbuilder,代码行数:4,代码来源:test_metrics.py
示例19: test_seuclidean_2
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)
开发者ID:jimsnyderjr,项目名称:msmbuilder,代码行数:5,代码来源:test_metrics.py
示例20: test_canberra
def test_canberra(self):
reference = pdist(self.Xd, metric='canberra')
testing = fast_pdist(self.Xd, metric='canberra')
eq(reference, testing)
开发者ID:dvanatta,项目名称:msmbuilder,代码行数:4,代码来源:test_metrics.py
注:本文中的msmbuilder.metrics.core.fast_pdist函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论