Class represents BSAS clustering algorithm - basic sequential algorithmic scheme. More...
Public Member Functions | |
def | __init__ (self, data, maximum_clusters, threshold, ccore=True, kwargs) |
Creates classical BSAS algorithm. More... | |
def | process (self) |
Performs cluster analysis in line with rules of BSAS algorithm. More... | |
def | get_clusters (self) |
Returns list of allocated clusters, each cluster contains indexes of objects in list of data. More... | |
def | get_representatives (self) |
Returns list of representatives of allocated clusters. More... | |
def | get_cluster_encoding (self) |
Returns clustering result representation type that indicate how clusters are encoded. More... | |
Class represents BSAS clustering algorithm - basic sequential algorithmic scheme.
Algorithm has two mandatory parameters: maximum allowable number of clusters and threshold of dissimilarity or in other words maximum distance between points. Distance metric also can be specified using 'metric' parameters, by default 'Manhattan' distance is used. BSAS using following rule for updating cluster representative:
Clustering results of this algorithm depends on objects order in input data.
Example:
def pyclustering.cluster.bsas.bsas.__init__ | ( | self, | |
data, | |||
maximum_clusters, | |||
threshold, | |||
ccore = True , |
|||
kwargs | |||
) |
Creates classical BSAS algorithm.
[in] | data | (list): Input data that is presented as list of points (objects), each point should be represented by list or tuple. |
[in] | maximum_clusters | Maximum allowable number of clusters that can be allocated during processing. |
[in] | threshold | Threshold of dissimilarity (maximum distance) between points. |
[in] | ccore | (bool): If True than CCORE (C++ part of the library) will be used for solving. |
[in] | **kwargs | Arbitrary keyword arguments (available arguments: 'metric'). |
Keyword Args:
def pyclustering.cluster.bsas.bsas.get_cluster_encoding | ( | self | ) |
Returns clustering result representation type that indicate how clusters are encoded.
def pyclustering.cluster.bsas.bsas.get_clusters | ( | self | ) |
Returns list of allocated clusters, each cluster contains indexes of objects in list of data.
Definition at line 192 of file bsas.py.
Referenced by pyclustering.samples.answer_reader.get_cluster_lengths(), and pyclustering.cluster.optics.optics.process().
def pyclustering.cluster.bsas.bsas.get_representatives | ( | self | ) |
Returns list of representatives of allocated clusters.
def pyclustering.cluster.bsas.bsas.process | ( | self | ) |
Performs cluster analysis in line with rules of BSAS algorithm.