Class implements BANG grid based clustering algorithm. More...
Public Member Functions | |
def | __init__ (self, data, levels, ccore=False, kwargs) |
Create BANG clustering algorithm. More... | |
def | process (self) |
Performs clustering process in line with rules of BANG clustering algorithm. More... | |
def | get_clusters (self) |
Returns allocated clusters. More... | |
def | get_noise (self) |
Returns allocated noise. More... | |
def | get_directory (self) |
Returns grid directory that describes grid of the processed data. More... | |
def | get_dendrogram (self) |
Returns dendrogram of clusters. More... | |
def | get_cluster_encoding (self) |
Returns clustering result representation type that indicate how clusters are encoded. More... | |
Class implements BANG grid based clustering algorithm.
BANG clustering algorithms uses a multidimensional grid structure to organize the value space surrounding the pattern values. The patterns are grouped into blocks and clustered with respect to the blocks by a topological neighbor search algorithm [36].
Code example of BANG usage:
There is visualization of BANG-clustering of three-dimensional data 'chainlink'. BANG-blocks that were formed during processing are shown on following figure. The darkest color means highest density, blocks that does not cover points are transparent:
Here is obtained dendrogram that can be used for further analysis to improve clustering results:
BANG clustering result of 'chainlink' data:
def pyclustering.cluster.bang.bang.__init__ | ( | self, | |
data, | |||
levels, | |||
ccore = False , |
|||
kwargs | |||
) |
Create BANG clustering algorithm.
[in] | data | (list): Input data (list of points) that should be clustered. |
[in] | levels | (uint): Amount of levels in tree that is used for splitting (how many times block should be split). For example, if amount of levels is two then surface will be divided into two blocks and each obtained block will be divided into blocks also. |
[in] | ccore | (bool): Reserved positional argument - not used yet. |
[in] | **kwargs | Arbitrary keyword arguments (available arguments: 'observe'). |
Keyword Args:
def pyclustering.cluster.bang.bang.get_cluster_encoding | ( | self | ) |
Returns clustering result representation type that indicate how clusters are encoded.
def pyclustering.cluster.bang.bang.get_clusters | ( | self | ) |
Returns allocated clusters.
Definition at line 1058 of file bang.py.
Referenced by pyclustering.samples.answer_reader.get_cluster_lengths(), and pyclustering.cluster.optics.optics.process().
def pyclustering.cluster.bang.bang.get_dendrogram | ( | self | ) |
Returns dendrogram of clusters.
Dendrogram is created in following way: the density indices of all regions are calculated and sorted in decreasing order for each cluster during clustering process.
def pyclustering.cluster.bang.bang.get_directory | ( | self | ) |
Returns grid directory that describes grid of the processed data.
def pyclustering.cluster.bang.bang.get_noise | ( | self | ) |
Returns allocated noise.
def pyclustering.cluster.bang.bang.process | ( | self | ) |
Performs clustering process in line with rules of BANG clustering algorithm.