pyclustering.cluster.somsc.somsc Class Reference

Class represents simple clustering algorithm based on self-organized feature map. More...

Public Member Functions

def __init__ (self, data, amount_clusters, epouch=100, ccore=True)
 Creates SOM-SC (Self Organized Map for Simple Clustering) algorithm for clustering analysis. More...
 
def process (self)
 Performs cluster analysis by competition between neurons of SOM. More...
 
def get_clusters (self)
 Returns list of allocated clusters, each cluster contains indexes of objects in list of data. More...
 
def get_cluster_encoding (self)
 Returns clustering result representation type that indicate how clusters are encoded. More...
 

Detailed Description

Class represents simple clustering algorithm based on self-organized feature map.

This algorithm uses amount of clusters that should be allocated as a size of SOM map. Captured objects by neurons are clusters. Algorithm is able to process data with Gaussian distribution that has spherical forms.

CCORE option can be used to use the pyclustering core - C/C++ shared library for processing that significantly increases performance.

Example:

# load list of points for cluster analysis
sample = read_sample(path);
# create instance of SOM-SC algorithm to allocated two clusters
somsc_instance = somsc(sample, 2);
# run cluster analysis and obtain results
somsc_instance.process();
somsc_instance.get_clusters();

Definition at line 36 of file somsc.py.

Constructor & Destructor Documentation

◆ __init__()

def pyclustering.cluster.somsc.somsc.__init__ (   self,
  data,
  amount_clusters,
  epouch = 100,
  ccore = True 
)

Creates SOM-SC (Self Organized Map for Simple Clustering) algorithm for clustering analysis.

Parameters
[in]data(list): List of points that are used for processing.
[in]amount_clusters(uint): Amount of clusters that should be allocated.
[in]epouch(uint): Number of epochs for training of SOM.
[in]ccore(bool): If it is True then CCORE implementation will be used for clustering analysis.

Definition at line 59 of file somsc.py.

Member Function Documentation

◆ get_cluster_encoding()

def pyclustering.cluster.somsc.somsc.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 103 of file somsc.py.

◆ get_clusters()

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

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

See also
process()

Definition at line 92 of file somsc.py.

Referenced by pyclustering.samples.answer_reader.get_cluster_lengths().

◆ process()

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

Performs cluster analysis by competition between neurons of SOM.

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

Definition at line 78 of file somsc.py.


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