• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Python kmeans_templates.KmeansTestTemplates类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Python中pyclustering.cluster.tests.kmeans_templates.KmeansTestTemplates的典型用法代码示例。如果您正苦于以下问题:Python KmeansTestTemplates类的具体用法?Python KmeansTestTemplates怎么用?Python KmeansTestTemplates使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



在下文中一共展示了KmeansTestTemplates类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Python代码示例。

示例1: templateKmeansPlusPlusForClustering

 def templateKmeansPlusPlusForClustering(self, path_sample, amount, expected_clusters_length):
     result_success = True
     for _ in range(3):
         try:
             sample = read_sample(path_sample)
             start_centers = kmeans_plusplus_initializer(sample, amount).initialize()
             KmeansTestTemplates.templateLengthProcessData(path_sample, start_centers, expected_clusters_length, False)
         
         except AssertionError:
             continue
         
         break
     
     assert result_success == True;
开发者ID:annoviko,项目名称:pyclustering,代码行数:14,代码来源:ut_center_initializer.py


示例2: testWrongNumberOfCentersSimpleSample5

 def testWrongNumberOfCentersSimpleSample5(self):
     KmeansTestTemplates.templateLengthProcessData(SIMPLE_SAMPLES.SAMPLE_SIMPLE5, [[-1.9, 3.2], [1.2, 34.5], [15.2, 34.8], [192, 234], [-32.3, -106]], None, False)
开发者ID:annoviko,项目名称:pyclustering,代码行数:2,代码来源:ut_kmeans.py


示例3: testClusterOneAllocationSampleSimple2

 def testClusterOneAllocationSampleSimple2(self):
     KmeansTestTemplates.templateLengthProcessData(SIMPLE_SAMPLES.SAMPLE_SIMPLE2, [[0.5, 0.2]], [23], False)
开发者ID:annoviko,项目名称:pyclustering,代码行数:2,代码来源:ut_kmeans.py


示例4: testClusterAllocationSampleSimple1ChiSquare

 def testClusterAllocationSampleSimple1ChiSquare(self):
     metric = distance_metric(type_metric.CHI_SQUARE)
     KmeansTestTemplates.templateLengthProcessData(SIMPLE_SAMPLES.SAMPLE_SIMPLE1, [[3.7, 5.5], [6.7, 7.5]], [5, 5], False, metric=metric)
开发者ID:annoviko,项目名称:pyclustering,代码行数:3,代码来源:ut_kmeans.py


示例5: testClusterAllocationSampleSimple1UserDefinedInfitityProcessing

 def testClusterAllocationSampleSimple1UserDefinedInfitityProcessing(self):
     metric = distance_metric(type_metric.USER_DEFINED, func=lambda p1, p2: p1[0] + p2[0] + 2)
     KmeansTestTemplates.templateLengthProcessData(SIMPLE_SAMPLES.SAMPLE_SIMPLE1, [[3.7, 5.5], [6.7, 7.5]], [10], False, metric=metric)
开发者ID:annoviko,项目名称:pyclustering,代码行数:3,代码来源:ut_kmeans.py


示例6: testClusterAllocationSampleSimple1UserDefined1

 def testClusterAllocationSampleSimple1UserDefined1(self):
     metric = distance_metric(type_metric.USER_DEFINED, func=distance_metric(type_metric.EUCLIDEAN))
     KmeansTestTemplates.templateLengthProcessData(SIMPLE_SAMPLES.SAMPLE_SIMPLE1, [[3.7, 5.5], [6.7, 7.5]], [5, 5], False, metric=metric)
开发者ID:annoviko,项目名称:pyclustering,代码行数:3,代码来源:ut_kmeans.py


示例7: testClusterAllocationSampleSimple1Manhattan

 def testClusterAllocationSampleSimple1Manhattan(self):
     metric = distance_metric(type_metric.MANHATTAN)
     KmeansTestTemplates.templateLengthProcessData(SIMPLE_SAMPLES.SAMPLE_SIMPLE1, [[3.7, 5.5], [6.7, 7.5]], [5, 5], False, metric=metric)
开发者ID:annoviko,项目名称:pyclustering,代码行数:3,代码来源:ut_kmeans.py


示例8: testClusterAllocationSampleSimple1

 def testClusterAllocationSampleSimple1(self):
     KmeansTestTemplates.templateLengthProcessData(SIMPLE_SAMPLES.SAMPLE_SIMPLE1, [[3.7, 5.5], [6.7, 7.5]], [5, 5], False)
开发者ID:annoviko,项目名称:pyclustering,代码行数:2,代码来源:ut_kmeans.py


示例9: testObserveSampleSimple1

 def testObserveSampleSimple1(self):
     KmeansTestTemplates.templateCollectEvolution(SIMPLE_SAMPLES.SAMPLE_SIMPLE1, [[3.5, 5.6], [6.8, 7.4]], [5, 5], False)
开发者ID:annoviko,项目名称:pyclustering,代码行数:2,代码来源:ut_kmeans.py


示例10: testClusterAllocationOneDimensionData

 def testClusterAllocationOneDimensionData(self):
     KmeansTestTemplates.templateClusterAllocationOneDimensionData(False)
开发者ID:annoviko,项目名称:pyclustering,代码行数:2,代码来源:ut_kmeans.py


示例11: testThreeDimensionalData1

 def testThreeDimensionalData1(self):
     KmeansTestTemplates.templateLengthProcessData(SIMPLE_SAMPLES.SAMPLE_SIMPLE11, [[1.0, 0.6, 0.8], [4.1, 4.2, 4.3]], [10, 10], False)
开发者ID:annoviko,项目名称:pyclustering,代码行数:2,代码来源:ut_kmeans.py


示例12: testOneDimensionalData2

 def testOneDimensionalData2(self):
     KmeansTestTemplates.templateLengthProcessData(SIMPLE_SAMPLES.SAMPLE_SIMPLE9, [[4.5], [6.2]], [20, 10], False)
开发者ID:annoviko,项目名称:pyclustering,代码行数:2,代码来源:ut_kmeans.py


示例13: testOneDimensionalData1

 def testOneDimensionalData1(self):
     KmeansTestTemplates.templateLengthProcessData(SIMPLE_SAMPLES.SAMPLE_SIMPLE8, [[-2.0], [3.0], [6.0], [12.0]], [15, 30, 20, 80], False)
开发者ID:annoviko,项目名称:pyclustering,代码行数:2,代码来源:ut_kmeans.py


示例14: testTheSameData2

 def testTheSameData2(self):
     KmeansTestTemplates.templateLengthProcessData(SIMPLE_SAMPLES.SAMPLE_SIMPLE12, [ [1.0, 1.0], [2.5, 2.5], [4.0, 4.0] ], [5, 5, 5], False)
开发者ID:annoviko,项目名称:pyclustering,代码行数:2,代码来源:ut_kmeans.py


示例15: testTheSameData1

 def testTheSameData1(self):
     KmeansTestTemplates.templateLengthProcessData(SIMPLE_SAMPLES.SAMPLE_SIMPLE9, [ [4.0], [8.0] ], [10, 20], False)
开发者ID:annoviko,项目名称:pyclustering,代码行数:2,代码来源:ut_kmeans.py


示例16: testAnimateResultsOneDimensionalData

 def testAnimateResultsOneDimensionalData(self):
     KmeansTestTemplates.templateAnimateClusteringResultNoFailure(SIMPLE_SAMPLES.SAMPLE_SIMPLE8, [[-2.0], [3.0], [6.0], [12.0]], False)
开发者ID:annoviko,项目名称:pyclustering,代码行数:2,代码来源:ut_kmeans.py


示例17: testAnimateResultsThreeDimensionalData

 def testAnimateResultsThreeDimensionalData(self):
     KmeansTestTemplates.templateAnimateClusteringResultNoFailure(SIMPLE_SAMPLES.SAMPLE_SIMPLE11, [[1.0, 0.6, 0.8], [4.1, 4.2, 4.3]], False)
开发者ID:annoviko,项目名称:pyclustering,代码行数:2,代码来源:ut_kmeans.py


示例18: testObserveSampleSimple1OneCluster

 def testObserveSampleSimple1OneCluster(self):
     KmeansTestTemplates.templateCollectEvolution(SIMPLE_SAMPLES.SAMPLE_SIMPLE1, [[3.3, 5.4]], [10], False)
开发者ID:annoviko,项目名称:pyclustering,代码行数:2,代码来源:ut_kmeans.py


示例19: testClusterOneAllocationSampleSimple1

 def testClusterOneAllocationSampleSimple1(self):
     KmeansTestTemplates.templateLengthProcessData(SIMPLE_SAMPLES.SAMPLE_SIMPLE1, [[1.0, 2.5]], [10], False)
开发者ID:annoviko,项目名称:pyclustering,代码行数:2,代码来源:ut_kmeans.py


示例20: testObserveSampleSimple2

 def testObserveSampleSimple2(self):
     KmeansTestTemplates.templateCollectEvolution(SIMPLE_SAMPLES.SAMPLE_SIMPLE2, [[3.4, 4.9], [6.8, 7.1], [7.6, 0.4]], [10, 5, 8], False)
开发者ID:annoviko,项目名称:pyclustering,代码行数:2,代码来源:ut_kmeans.py



注:本文中的pyclustering.cluster.tests.kmeans_templates.KmeansTestTemplates类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap