pyclustering.cluster.cure.cure Class Reference

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...
 

Detailed Description

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.

Example:

# read data for clustering from some file
sample = read_sample(path_to_data);
# create instance of cure algorithm for cluster analysis
# request for allocation of two clusters.
cure_instance = cure(sample, 2, 5, 0.5, True);
# run cluster analysis
cure_instance.process();
# get results of clustering
clusters = cure_instance.get_clusters();

Definition at line 89 of file cure.py.

Constructor & Destructor Documentation

◆ __init__()

def pyclustering.cluster.cure.cure.__init__ (   self,
  data,
  number_cluster,
  number_represent_points = 5,
  compression = 0.5,
  ccore = True 
)

Constructor of clustering algorithm CURE.

Parameters
[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.

Definition at line 112 of file cure.py.

Member Function Documentation

◆ get_cluster_encoding()

def pyclustering.cluster.cure.cure.get_cluster_encoding (   self)

Returns clustering result representation type that indicate how clusters are encoded.

Returns
(type_encoding) Clustering result representation.
See also
get_clusters()

Definition at line 293 of file cure.py.

◆ get_clusters()

def pyclustering.cluster.cure.cure.get_clusters (   self)

Returns list of allocated clusters, each cluster contains indexes of objects in list of data.

Returns
(list) List of allocated clusters.
See also
process()
get_representors()
get_means()

Definition at line 248 of file cure.py.

Referenced by pyclustering.samples.answer_reader.get_cluster_lengths(), and pyclustering.cluster.optics.optics.process().

◆ get_means()

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.

Returns
(list) List of mean values of each cluster.
See also
get_clusters()
get_representors()

Definition at line 278 of file cure.py.

◆ get_representors()

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.

Returns
(list) List of point-representors of each cluster.
See also
get_clusters()
get_means()

Definition at line 263 of file cure.py.

◆ process()

def pyclustering.cluster.cure.cure.process (   self)

Performs cluster analysis in line with rules of CURE algorithm.

Remarks
Results of clustering can be obtained using corresponding get methods.
See also
get_clusters()

Definition at line 141 of file cure.py.


The documentation for this class was generated from the following file: