pyclustering.cluster.bang.bang_directory Class Reference

BANG directory stores BANG-blocks that represents grid in data space. More...

Public Member Functions

def __init__ (self, data, levels, kwargs)
 Create BANG directory - basically tree structure with direct access to leafs. More...
 
def __len__ (self)
 Returns amount of blocks that is stored in the directory. More...
 
def get_data (self)
 Return data that is stored in the directory. More...
 
def get_leafs (self)
 Return leafs - the smallest blocks. More...
 
def get_level (self, level)
 Returns BANG blocks on the specific level. More...
 
def get_height (self)
 Returns height of BANG tree where blocks are stored. More...
 

Detailed Description

BANG directory stores BANG-blocks that represents grid in data space.

The directory build BANG-blocks in binary tree manner. Leafs of the tree stored separately to provide a direct access to the leafs that should be analysed. Leafs cache data-points.

Definition at line 416 of file bang.py.

Constructor & Destructor Documentation

◆ __init__()

def pyclustering.cluster.bang.bang_directory.__init__ (   self,
  data,
  levels,
  kwargs 
)

Create BANG directory - basically tree structure with direct access to leafs.

Parameters
[in]data(list): Input data that is clustered.
[in]levels(uint): Height of the blocks tree.
[in]**kwargsArbitrary keyword arguments (available arguments: 'observe').

Keyword Args:

  • observe (bool): If 'True' then blocks on each level are stored.
  • density_threshold (double): The lowest level of density when contained data in bang-block is considered as a noise and there is no need to split it till the last level. Be aware that this parameter is used with 'amount_threshold' parameter.
  • amount_threshold (uint): Amount of points in the block when it contained data in bang-block is considered as a noise and there is no need to split it till the last level.

Definition at line 423 of file bang.py.

Member Function Documentation

◆ __len__()

def pyclustering.cluster.bang.bang_directory.__len__ (   self)

Returns amount of blocks that is stored in the directory.

Returns
(uint) Amount of blocks in the BANG directory.

Definition at line 453 of file bang.py.

◆ get_data()

def pyclustering.cluster.bang.bang_directory.get_data (   self)

Return data that is stored in the directory.

Returns
(list) List of points that represents stored data.

Definition at line 463 of file bang.py.

◆ get_height()

def pyclustering.cluster.bang.bang_directory.get_height (   self)

Returns height of BANG tree where blocks are stored.

Returns
(uint) Height of BANG tree.

Definition at line 497 of file bang.py.

◆ get_leafs()

def pyclustering.cluster.bang.bang_directory.get_leafs (   self)

Return leafs - the smallest blocks.

Some leafs can be bigger than others because splitting is not performed for blocks whose density is less than threshold.

Returns
(list) List of blocks that are leafs of BANG directory.

Definition at line 473 of file bang.py.

◆ get_level()

def pyclustering.cluster.bang.bang_directory.get_level (   self,
  level 
)

Returns BANG blocks on the specific level.

Parameters
[in]level(uint): Level of tree where BANG blocks are located.
Returns
(list) List of BANG blocks on the specific level.

Definition at line 485 of file bang.py.


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