當前位置: 首頁>>代碼示例>>Python>>正文


Python KmedoidsTestTemplates.templateLengthProcessData方法代碼示例

本文整理匯總了Python中pyclustering.cluster.tests.kmedoids_templates.KmedoidsTestTemplates.templateLengthProcessData方法的典型用法代碼示例。如果您正苦於以下問題:Python KmedoidsTestTemplates.templateLengthProcessData方法的具體用法?Python KmedoidsTestTemplates.templateLengthProcessData怎麽用?Python KmedoidsTestTemplates.templateLengthProcessData使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在pyclustering.cluster.tests.kmedoids_templates.KmedoidsTestTemplates的用法示例。


在下文中一共展示了KmedoidsTestTemplates.templateLengthProcessData方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。

示例1: templateKmeansPlusPlusForKmedoidsClustering

# 需要導入模塊: from pyclustering.cluster.tests.kmedoids_templates import KmedoidsTestTemplates [as 別名]
# 或者: from pyclustering.cluster.tests.kmedoids_templates.KmedoidsTestTemplates import templateLengthProcessData [as 別名]
    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,代碼行數:16,代碼來源:ut_center_initializer.py

示例2: testClusterAllocationSampleSimple5ByCore

# 需要導入模塊: from pyclustering.cluster.tests.kmedoids_templates import KmedoidsTestTemplates [as 別名]
# 或者: from pyclustering.cluster.tests.kmedoids_templates.KmedoidsTestTemplates import templateLengthProcessData [as 別名]
 def testClusterAllocationSampleSimple5ByCore(self):
     KmedoidsTestTemplates.templateLengthProcessData(SIMPLE_SAMPLES.SAMPLE_SIMPLE5, [4, 18, 34, 55], [15, 15, 15, 15], True)
開發者ID:annoviko,項目名稱:pyclustering,代碼行數:4,代碼來源:it_kmedoids.py

示例3: testClusterAllocationSampleSimple3ByCore

# 需要導入模塊: from pyclustering.cluster.tests.kmedoids_templates import KmedoidsTestTemplates [as 別名]
# 或者: from pyclustering.cluster.tests.kmedoids_templates.KmedoidsTestTemplates import templateLengthProcessData [as 別名]
 def testClusterAllocationSampleSimple3ByCore(self):
     KmedoidsTestTemplates.templateLengthProcessData(SIMPLE_SAMPLES.SAMPLE_SIMPLE3, [4, 12, 25, 37], [10, 10, 10, 30], True)
開發者ID:annoviko,項目名稱:pyclustering,代碼行數:4,代碼來源:it_kmedoids.py

示例4: testClusterOneAllocationSampleSimple2DistanceMatrixByCore

# 需要導入模塊: from pyclustering.cluster.tests.kmedoids_templates import KmedoidsTestTemplates [as 別名]
# 或者: from pyclustering.cluster.tests.kmedoids_templates.KmedoidsTestTemplates import templateLengthProcessData [as 別名]
 def testClusterOneAllocationSampleSimple2DistanceMatrixByCore(self):
     KmedoidsTestTemplates.templateLengthProcessData(SIMPLE_SAMPLES.SAMPLE_SIMPLE2, [10], [23], True, data_type='distance_matrix')
開發者ID:annoviko,項目名稱:pyclustering,代碼行數:4,代碼來源:it_kmedoids.py

示例5: testClusterAllocationSampleSimple2DistanceMatrix

# 需要導入模塊: from pyclustering.cluster.tests.kmedoids_templates import KmedoidsTestTemplates [as 別名]
# 或者: from pyclustering.cluster.tests.kmedoids_templates.KmedoidsTestTemplates import templateLengthProcessData [as 別名]
 def testClusterAllocationSampleSimple2DistanceMatrix(self):
     KmedoidsTestTemplates.templateLengthProcessData(SIMPLE_SAMPLES.SAMPLE_SIMPLE2, [3, 12, 20], [10, 5, 8], False, data_type='distance_matrix')
開發者ID:annoviko,項目名稱:pyclustering,代碼行數:4,代碼來源:ut_kmedoids.py

示例6: testClusterAllocationSampleSimple1DistanceMatrixByCore

# 需要導入模塊: from pyclustering.cluster.tests.kmedoids_templates import KmedoidsTestTemplates [as 別名]
# 或者: from pyclustering.cluster.tests.kmedoids_templates.KmedoidsTestTemplates import templateLengthProcessData [as 別名]
 def testClusterAllocationSampleSimple1DistanceMatrixByCore(self):
     KmedoidsTestTemplates.templateLengthProcessData(SIMPLE_SAMPLES.SAMPLE_SIMPLE1, [2, 9], [5, 5], True, data_type='distance_matrix')
開發者ID:annoviko,項目名稱:pyclustering,代碼行數:4,代碼來源:it_kmedoids.py

示例7: testItermax10Simple01

# 需要導入模塊: from pyclustering.cluster.tests.kmedoids_templates import KmedoidsTestTemplates [as 別名]
# 或者: from pyclustering.cluster.tests.kmedoids_templates.KmedoidsTestTemplates import templateLengthProcessData [as 別名]
 def testItermax10Simple01(self):
     KmedoidsTestTemplates.templateLengthProcessData(SIMPLE_SAMPLES.SAMPLE_SIMPLE1, [2, 9], [5, 5], True, itermax=10)
開發者ID:annoviko,項目名稱:pyclustering,代碼行數:4,代碼來源:it_kmedoids.py

示例8: testProcessingWhenLibraryCoreCorrupted

# 需要導入模塊: from pyclustering.cluster.tests.kmedoids_templates import KmedoidsTestTemplates [as 別名]
# 或者: from pyclustering.cluster.tests.kmedoids_templates.KmedoidsTestTemplates import templateLengthProcessData [as 別名]
 def testProcessingWhenLibraryCoreCorrupted(self):
     KmedoidsTestTemplates.templateLengthProcessData(SIMPLE_SAMPLES.SAMPLE_SIMPLE1, [2, 9], [5, 5], True)
開發者ID:annoviko,項目名稱:pyclustering,代碼行數:4,代碼來源:it_kmedoids.py

示例9: testItermax1

# 需要導入模塊: from pyclustering.cluster.tests.kmedoids_templates import KmedoidsTestTemplates [as 別名]
# 或者: from pyclustering.cluster.tests.kmedoids_templates.KmedoidsTestTemplates import templateLengthProcessData [as 別名]
 def testItermax1(self):
     KmedoidsTestTemplates.templateLengthProcessData(SIMPLE_SAMPLES.SAMPLE_SIMPLE1, [2, 9], [5, 5], False, itermax=1)
開發者ID:annoviko,項目名稱:pyclustering,代碼行數:4,代碼來源:ut_kmedoids.py

示例10: testClusterTheSameData2DistanceMatrix

# 需要導入模塊: from pyclustering.cluster.tests.kmedoids_templates import KmedoidsTestTemplates [as 別名]
# 或者: from pyclustering.cluster.tests.kmedoids_templates.KmedoidsTestTemplates import templateLengthProcessData [as 別名]
 def testClusterTheSameData2DistanceMatrix(self):
     KmedoidsTestTemplates.templateLengthProcessData(SIMPLE_SAMPLES.SAMPLE_SIMPLE12, [2, 7, 12], [5, 5, 5], False, data_type='distance_matrix')
開發者ID:annoviko,項目名稱:pyclustering,代碼行數:4,代碼來源:ut_kmedoids.py

示例11: testClusterTheSameData1DistanceMatrix

# 需要導入模塊: from pyclustering.cluster.tests.kmedoids_templates import KmedoidsTestTemplates [as 別名]
# 或者: from pyclustering.cluster.tests.kmedoids_templates.KmedoidsTestTemplates import templateLengthProcessData [as 別名]
 def testClusterTheSameData1DistanceMatrix(self):
     KmedoidsTestTemplates.templateLengthProcessData(SIMPLE_SAMPLES.SAMPLE_SIMPLE9, [2, 20], [10, 20], False, data_type='distance_matrix')
開發者ID:annoviko,項目名稱:pyclustering,代碼行數:4,代碼來源:ut_kmedoids.py

示例12: testClusterOneAllocationSampleSimple5

# 需要導入模塊: from pyclustering.cluster.tests.kmedoids_templates import KmedoidsTestTemplates [as 別名]
# 或者: from pyclustering.cluster.tests.kmedoids_templates.KmedoidsTestTemplates import templateLengthProcessData [as 別名]
 def testClusterOneAllocationSampleSimple5(self):
     KmedoidsTestTemplates.templateLengthProcessData(SIMPLE_SAMPLES.SAMPLE_SIMPLE5, [35], [60], False)
開發者ID:annoviko,項目名稱:pyclustering,代碼行數:4,代碼來源:ut_kmedoids.py

示例13: testClusterAllocationSampleSimple5DistanceMatrix

# 需要導入模塊: from pyclustering.cluster.tests.kmedoids_templates import KmedoidsTestTemplates [as 別名]
# 或者: from pyclustering.cluster.tests.kmedoids_templates.KmedoidsTestTemplates import templateLengthProcessData [as 別名]
 def testClusterAllocationSampleSimple5DistanceMatrix(self):
     KmedoidsTestTemplates.templateLengthProcessData(SIMPLE_SAMPLES.SAMPLE_SIMPLE5, [4, 18, 34, 55], [15, 15, 15, 15], False, data_type='distance_matrix')
開發者ID:annoviko,項目名稱:pyclustering,代碼行數:4,代碼來源:ut_kmedoids.py

示例14: testClusterAllocationSampleSimple3WithMedoidsInitializer

# 需要導入模塊: from pyclustering.cluster.tests.kmedoids_templates import KmedoidsTestTemplates [as 別名]
# 或者: from pyclustering.cluster.tests.kmedoids_templates.KmedoidsTestTemplates import templateLengthProcessData [as 別名]
 def testClusterAllocationSampleSimple3WithMedoidsInitializer(self):
     KmedoidsTestTemplates.templateLengthProcessData(SIMPLE_SAMPLES.SAMPLE_SIMPLE3, None, [10, 10, 10, 30], False, initialize_medoids=4)
開發者ID:annoviko,項目名稱:pyclustering,代碼行數:4,代碼來源:ut_kmedoids.py

示例15: testClusterAllocationSampleSimple3DistanceMatrix

# 需要導入模塊: from pyclustering.cluster.tests.kmedoids_templates import KmedoidsTestTemplates [as 別名]
# 或者: from pyclustering.cluster.tests.kmedoids_templates.KmedoidsTestTemplates import templateLengthProcessData [as 別名]
 def testClusterAllocationSampleSimple3DistanceMatrix(self):
     KmedoidsTestTemplates.templateLengthProcessData(SIMPLE_SAMPLES.SAMPLE_SIMPLE3, [4, 12, 25, 37], [10, 10, 10, 30], False, data_type='distance_matrix')
開發者ID:annoviko,項目名稱:pyclustering,代碼行數:4,代碼來源:ut_kmedoids.py


注:本文中的pyclustering.cluster.tests.kmedoids_templates.KmedoidsTestTemplates.templateLengthProcessData方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。