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

Python kmedoids_templates.KmedoidsTestTemplates类代码示例

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

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



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

示例1: testAllocatedRequestedClustersSampleSimple03

 def testAllocatedRequestedClustersSampleSimple03(self):
     sample = read_sample(SIMPLE_SAMPLES.SAMPLE_SIMPLE3)
     KmedoidsTestTemplates.templateAllocateRequestedClusterAmount(sample, 2, None, False)
     KmedoidsTestTemplates.templateAllocateRequestedClusterAmount(sample, 5, None, False)
     KmedoidsTestTemplates.templateAllocateRequestedClusterAmount(sample, 8, None, False)
     KmedoidsTestTemplates.templateAllocateRequestedClusterAmount(sample, 10, None, False)
     KmedoidsTestTemplates.templateAllocateRequestedClusterAmount(sample, 15, None, False)
开发者ID:annoviko,项目名称:pyclustering,代码行数:7,代码来源:ut_kmedoids.py


示例2: testAllocatedRequestedClustersWithTotallyTheSamePointsByCore

 def testAllocatedRequestedClustersWithTotallyTheSamePointsByCore(self):
     # Bug issue #366 - Kmedoids returns incorrect number of clusters.
     sample = [ [0.0, 0.0], [0.0, 0.0], [0.0, 0.0], [0.0, 0.0] ]
     KmedoidsTestTemplates.templateAllocateRequestedClusterAmount(sample, 4, None, True)
     KmedoidsTestTemplates.templateAllocateRequestedClusterAmount(sample, 3, None, True)
     KmedoidsTestTemplates.templateAllocateRequestedClusterAmount(sample, 2, None, True)
     KmedoidsTestTemplates.templateAllocateRequestedClusterAmount(sample, 1, None, True)
开发者ID:annoviko,项目名称:pyclustering,代码行数:7,代码来源:it_kmedoids.py


示例3: templateKmeansPlusPlusForKmedoidsClustering

    def templateKmeansPlusPlusForKmedoidsClustering(self, path_sample, amount, expected_clusters_length):
        result_success = True
        for _ in range(3):
            try:
                sample = read_sample(path_sample)
                start_medoids = kmeans_plusplus_initializer(sample, amount).initialize(return_index=True)
                KmedoidsTestTemplates.templateLengthProcessData(path_sample, start_medoids, expected_clusters_length,
                                                              False)

            except AssertionError:
                continue
            break

        assert result_success == True;
开发者ID:annoviko,项目名称:pyclustering,代码行数:14,代码来源:ut_center_initializer.py


示例4: testClusterOneAllocationSampleSimple2DistanceMatrixByCore

 def testClusterOneAllocationSampleSimple2DistanceMatrixByCore(self):
     KmedoidsTestTemplates.templateLengthProcessData(SIMPLE_SAMPLES.SAMPLE_SIMPLE2, [10], [23], True, data_type='distance_matrix')
开发者ID:annoviko,项目名称:pyclustering,代码行数:2,代码来源:it_kmedoids.py


示例5: testAllocatedRequestedClustersSampleSimple04ByCore

 def testAllocatedRequestedClustersSampleSimple04ByCore(self):
     sample = read_sample(SIMPLE_SAMPLES.SAMPLE_SIMPLE4)
     KmedoidsTestTemplates.templateAllocateRequestedClusterAmount(sample, 10, None, True)
     KmedoidsTestTemplates.templateAllocateRequestedClusterAmount(sample, 25, None, True)
     KmedoidsTestTemplates.templateAllocateRequestedClusterAmount(sample, 40, None, True)
开发者ID:annoviko,项目名称:pyclustering,代码行数:5,代码来源:it_kmedoids.py


示例6: testClusterAllocationSampleSimple1

 def testClusterAllocationSampleSimple1(self):
     KmedoidsTestTemplates.templateLengthProcessData(SIMPLE_SAMPLES.SAMPLE_SIMPLE1, [2, 9], [5, 5], False)
开发者ID:annoviko,项目名称:pyclustering,代码行数:2,代码来源:ut_kmedoids.py


示例7: testClusterAllocationSampleSimple1UserDefinedDistanceMatrixByCore

 def testClusterAllocationSampleSimple1UserDefinedDistanceMatrixByCore(self):
     metric = distance_metric(type_metric.USER_DEFINED, func=distance_metric(type_metric.EUCLIDEAN))
     KmedoidsTestTemplates.templateLengthProcessWithMetric(SIMPLE_SAMPLES.SAMPLE_SIMPLE1, [2, 9], [5, 5], metric, True, data_type='distance_matrix')
开发者ID:annoviko,项目名称:pyclustering,代码行数:3,代码来源:it_kmedoids.py


示例8: testClusterAllocationSampleSimple1ChebyshevDistanceMatrixByCore

 def testClusterAllocationSampleSimple1ChebyshevDistanceMatrixByCore(self):
     metric = distance_metric(type_metric.CHEBYSHEV)
     KmedoidsTestTemplates.templateLengthProcessWithMetric(SIMPLE_SAMPLES.SAMPLE_SIMPLE1, [2, 9], [5, 5], metric, True, data_type='distance_matrix')
开发者ID:annoviko,项目名称:pyclustering,代码行数:3,代码来源:it_kmedoids.py


示例9: testClusterAllocationSampleSimple1SquareEuclideanDistanceMatrixByCore

 def testClusterAllocationSampleSimple1SquareEuclideanDistanceMatrixByCore(self):
     metric = distance_metric(type_metric.EUCLIDEAN_SQUARE)
     KmedoidsTestTemplates.templateLengthProcessWithMetric(SIMPLE_SAMPLES.SAMPLE_SIMPLE1, [2, 9], [5, 5], metric, True, data_type='distance_matrix')
开发者ID:annoviko,项目名称:pyclustering,代码行数:3,代码来源:it_kmedoids.py


示例10: testClusterAllocationSampleSimple1DistanceMatrixByCore

 def testClusterAllocationSampleSimple1DistanceMatrixByCore(self):
     KmedoidsTestTemplates.templateLengthProcessData(SIMPLE_SAMPLES.SAMPLE_SIMPLE1, [2, 9], [5, 5], True, data_type='distance_matrix')
开发者ID:annoviko,项目名称:pyclustering,代码行数:2,代码来源:it_kmedoids.py


示例11: testItermax10Simple01

 def testItermax10Simple01(self):
     KmedoidsTestTemplates.templateLengthProcessData(SIMPLE_SAMPLES.SAMPLE_SIMPLE1, [2, 9], [5, 5], True, itermax=10)
开发者ID:annoviko,项目名称:pyclustering,代码行数:2,代码来源:it_kmedoids.py


示例12: testProcessingWhenLibraryCoreCorrupted

 def testProcessingWhenLibraryCoreCorrupted(self):
     KmedoidsTestTemplates.templateLengthProcessData(SIMPLE_SAMPLES.SAMPLE_SIMPLE1, [2, 9], [5, 5], True)
开发者ID:annoviko,项目名称:pyclustering,代码行数:2,代码来源:it_kmedoids.py


示例13: testClusterAllocationSampleSimple2ByCore

 def testClusterAllocationSampleSimple2ByCore(self):
     KmedoidsTestTemplates.templateLengthProcessData(SIMPLE_SAMPLES.SAMPLE_SIMPLE2, [3, 12, 20], [10, 5, 8], True)
开发者ID:annoviko,项目名称:pyclustering,代码行数:2,代码来源:it_kmedoids.py


示例14: testClusterAllocationSampleSimple1Minkowski

 def testClusterAllocationSampleSimple1Minkowski(self):
     metric = distance_metric(type_metric.MINKOWSKI, degree=2.0)
     KmedoidsTestTemplates.templateLengthProcessWithMetric(SIMPLE_SAMPLES.SAMPLE_SIMPLE1, [2, 9], [5, 5], metric, False)
开发者ID:annoviko,项目名称:pyclustering,代码行数:3,代码来源:ut_kmedoids.py


示例15: testClusterAllocationSampleSimple1Chebyshev

 def testClusterAllocationSampleSimple1Chebyshev(self):
     metric = distance_metric(type_metric.CHEBYSHEV)
     KmedoidsTestTemplates.templateLengthProcessWithMetric(SIMPLE_SAMPLES.SAMPLE_SIMPLE1, [2, 9], [5, 5], metric, False)
开发者ID:annoviko,项目名称:pyclustering,代码行数:3,代码来源:ut_kmedoids.py


示例16: testClusterAllocationSampleSimple1Manhattan

 def testClusterAllocationSampleSimple1Manhattan(self):
     metric = distance_metric(type_metric.MANHATTAN)
     KmedoidsTestTemplates.templateLengthProcessWithMetric(SIMPLE_SAMPLES.SAMPLE_SIMPLE1, [2, 9], [5, 5], metric, False)
开发者ID:annoviko,项目名称:pyclustering,代码行数:3,代码来源:ut_kmedoids.py


示例17: testClusterAllocationSampleSimple1SquareEuclidean

 def testClusterAllocationSampleSimple1SquareEuclidean(self):
     metric = distance_metric(type_metric.EUCLIDEAN_SQUARE)
     KmedoidsTestTemplates.templateLengthProcessWithMetric(SIMPLE_SAMPLES.SAMPLE_SIMPLE1, [2, 9], [5, 5], metric, False)
开发者ID:annoviko,项目名称:pyclustering,代码行数:3,代码来源:ut_kmedoids.py


示例18: testClusterAllocationSampleSimple1DistanceMatrixNumpy

 def testClusterAllocationSampleSimple1DistanceMatrixNumpy(self):
     KmedoidsTestTemplates.templateLengthProcessData(SIMPLE_SAMPLES.SAMPLE_SIMPLE1, [2, 9], [5, 5], False, data_type='distance_matrix', input_type='numpy')
开发者ID:annoviko,项目名称:pyclustering,代码行数:2,代码来源:ut_kmedoids.py


示例19: testItermax0

 def testItermax0(self):
     KmedoidsTestTemplates.templateLengthProcessData(SIMPLE_SAMPLES.SAMPLE_SIMPLE1, [2, 9], [], True, itermax=0)
开发者ID:annoviko,项目名称:pyclustering,代码行数:2,代码来源:it_kmedoids.py


示例20: testClusterAllocationSampleSimple3ByCore

 def testClusterAllocationSampleSimple3ByCore(self):
     KmedoidsTestTemplates.templateLengthProcessData(SIMPLE_SAMPLES.SAMPLE_SIMPLE3, [4, 12, 25, 37], [10, 10, 10, 30], True)
开发者ID:annoviko,项目名称:pyclustering,代码行数:2,代码来源:it_kmedoids.py



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
Python syncnet_templates.SyncnetTestTemplates类代码示例发布时间:2022-05-25
下一篇:
Python kmeans_templates.KmeansTestTemplates类代码示例发布时间:2022-05-25
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

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

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

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