本文整理匯總了Python中pyclustering.cluster.tests.kmedoids_templates.KmedoidsTestTemplates.templateAllocateRequestedClusterAmount方法的典型用法代碼示例。如果您正苦於以下問題:Python KmedoidsTestTemplates.templateAllocateRequestedClusterAmount方法的具體用法?Python KmedoidsTestTemplates.templateAllocateRequestedClusterAmount怎麽用?Python KmedoidsTestTemplates.templateAllocateRequestedClusterAmount使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類pyclustering.cluster.tests.kmedoids_templates.KmedoidsTestTemplates
的用法示例。
在下文中一共展示了KmedoidsTestTemplates.templateAllocateRequestedClusterAmount方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: testAllocatedRequestedClustersSampleSimple03
# 需要導入模塊: from pyclustering.cluster.tests.kmedoids_templates import KmedoidsTestTemplates [as 別名]
# 或者: from pyclustering.cluster.tests.kmedoids_templates.KmedoidsTestTemplates import templateAllocateRequestedClusterAmount [as 別名]
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)
示例2: testAllocatedRequestedClustersWithTotallyTheSamePointsByCore
# 需要導入模塊: from pyclustering.cluster.tests.kmedoids_templates import KmedoidsTestTemplates [as 別名]
# 或者: from pyclustering.cluster.tests.kmedoids_templates.KmedoidsTestTemplates import templateAllocateRequestedClusterAmount [as 別名]
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)
示例3: testAllocatedRequestedClustersSampleSimple04ByCore
# 需要導入模塊: from pyclustering.cluster.tests.kmedoids_templates import KmedoidsTestTemplates [as 別名]
# 或者: from pyclustering.cluster.tests.kmedoids_templates.KmedoidsTestTemplates import templateAllocateRequestedClusterAmount [as 別名]
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)