pyclustering
0.10.1
pyclustring is a Python, C++ data mining library.
|
Class represents clustering algorithm CURE with KD-tree optimization. More...
Public Member Functions | |
def | __init__ (self, data, number_cluster, number_represent_points=5, compression=0.5, ccore=True) |
Constructor of clustering algorithm CURE. More... | |
def | process (self) |
Performs cluster analysis in line with rules of CURE algorithm. More... | |
def | get_clusters (self) |
Returns list of allocated clusters, each cluster contains indexes of objects in list of data. More... | |
def | get_representors (self) |
Returns list of point-representors of each cluster. More... | |
def | get_means (self) |
Returns list of mean values of each cluster. More... | |
def | get_cluster_encoding (self) |
Returns clustering result representation type that indicate how clusters are encoded. More... | |
Class represents clustering algorithm CURE with KD-tree optimization.
CCORE option can be used to use the pyclustering core - C/C++ shared library for processing that significantly increases performance.
Here is an example how to perform cluster analysis of sample 'Lsun':
def pyclustering.cluster.cure.cure.__init__ | ( | self, | |
data, | |||
number_cluster, | |||
number_represent_points = 5 , |
|||
compression = 0.5 , |
|||
ccore = True |
|||
) |
Constructor of clustering algorithm CURE.
[in] | data | (array_like): Input data that should be processed. |
[in] | number_cluster | (uint): Number of clusters that should be allocated. |
[in] | number_represent_points | (uint): Number of representative points for each cluster. |
[in] | compression | (double): Coefficient defines level of shrinking of representation points toward the mean of the new created cluster after merging on each step. Usually it destributed from 0 to 1. |
[in] | ccore | (bool): If True then CCORE (C++ solution) will be used for solving. |
def pyclustering.cluster.cure.cure.get_cluster_encoding | ( | self | ) |
Returns clustering result representation type that indicate how clusters are encoded.
def pyclustering.cluster.cure.cure.get_clusters | ( | self | ) |
Returns list of allocated clusters, each cluster contains indexes of objects in list of data.
Definition at line 233 of file cure.py.
Referenced by pyclustering.samples.answer_reader.get_cluster_lengths(), and pyclustering.cluster.optics.optics.process().
def pyclustering.cluster.cure.cure.get_means | ( | self | ) |
Returns list of mean values of each cluster.
Cluster index should be used for navigation between mean values.
def pyclustering.cluster.cure.cure.get_representors | ( | self | ) |
Returns list of point-representors of each cluster.
Cluster index should be used for navigation between lists of point-representors.
def pyclustering.cluster.cure.cure.process | ( | self | ) |
Performs cluster analysis in line with rules of CURE algorithm.