pyclustering.cluster.syncsom.syncsom Class Reference

Class represents clustering algorithm SYNC-SOM. More...

Public Member Functions

def som_layer (self)
 The first layer of the oscillatory network - self-organized feature map.
 
def sync_layer (self)
 The second layer of the oscillatory network based on Kuramoto model.
 
def __init__ (self, data, rows, cols, radius)
 Constructor of the double layer oscillatory network SYNC-SOM. More...
 
def process (self, collect_dynamic=False, order=0.999)
 Performs simulation of the oscillatory network. More...
 
def get_som_clusters (self)
 Returns clusters with SOM neurons that encode input features in line with result of synchronization in the second (Sync) layer. More...
 
def get_clusters (self, eps=0.1)
 Returns clusters in line with ensembles of synchronous oscillators where each synchronous ensemble corresponds to only one cluster. More...
 
def get_cluster_encoding (self)
 Returns clustering result representation type that indicate how clusters are encoded. More...
 
def show_som_layer (self)
 Shows visual representation of the first (SOM) layer.
 
def show_sync_layer (self)
 Shows visual representation of the second (Sync) layer.
 

Detailed Description

Class represents clustering algorithm SYNC-SOM.

SYNC-SOM is bio-inspired algorithm that is based on oscillatory network that uses self-organized feature map as the first layer.

Example:

# read sample for clustering
sample = read_sample(file);
# create oscillatory network for cluster analysis where the first layer has
# size 10x10 and connectivity radius for objects 1.0.
network = syncsom(sample, 10, 10, 1.0);
# simulate network (perform cluster analysis) and collect output dynamic
(dyn_time, dyn_phase) = network.process(True, 0.998);
# obtain encoded clusters
encoded_clusters = network.get_som_clusters();
# obtain real clusters
clusters = network.get_clusters();
# show the first layer of the network
network.show_som_layer();
# show the second layer of the network
network.show_sync_layer();

Definition at line 37 of file syncsom.py.

Constructor & Destructor Documentation

◆ __init__()

def pyclustering.cluster.syncsom.syncsom.__init__ (   self,
  data,
  rows,
  cols,
  radius 
)

Constructor of the double layer oscillatory network SYNC-SOM.

Parameters
[in]data(list): Input data that is presented as list of points (objects), each point should be represented by list or tuple.
[in]rows(uint): Rows of neurons (number of neurons in column) in the input layer (self-organized feature map).
[in]cols(uint): Columns of neurons (number of neurons in row) in the input later (self-organized feature map).
[in]radius(double): Connectivity radius between objects that defines connection between oscillators in the second layer.

Definition at line 87 of file syncsom.py.

Member Function Documentation

◆ get_cluster_encoding()

def pyclustering.cluster.syncsom.syncsom.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 238 of file syncsom.py.

◆ get_clusters()

def pyclustering.cluster.syncsom.syncsom.get_clusters (   self,
  eps = 0.1 
)

Returns clusters in line with ensembles of synchronous oscillators where each synchronous ensemble corresponds to only one cluster.

Parameters
[in]eps(double): Maximum error for allocation of synchronous ensemble oscillators.
Returns
(list) List of grours (lists) of indexes of synchronous oscillators that corresponds to index of objects.
See also
process()
get_som_clusters()

Definition at line 210 of file syncsom.py.

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

◆ get_som_clusters()

def pyclustering.cluster.syncsom.syncsom.get_som_clusters (   self)

Returns clusters with SOM neurons that encode input features in line with result of synchronization in the second (Sync) layer.

Returns
(list) List of clusters that are represented by lists of indexes of neurons that encode input data.
See also
process()
get_clusters()

Definition at line 184 of file syncsom.py.

◆ process()

def pyclustering.cluster.syncsom.syncsom.process (   self,
  collect_dynamic = False,
  order = 0.999 
)

Performs simulation of the oscillatory network.

Parameters
[in]collect_dynamic(bool): If True - returns whole dynamic of oscillatory network, otherwise returns only last values of dynamics.
[in]order(double): Order of process synchronization that should be considered as end of clustering, destributed 0..1.
Returns
(tuple) Dynamic of oscillatory network. If argument 'collect_dynamic' = True, than return dynamic for the whole simulation time, otherwise returns only last values (last step of simulation) of dynamic.
See also
get_som_clusters()
get_clusters()

Definition at line 111 of file syncsom.py.


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