pyclustering.container.cftree.cftree Class Reference

CF-Tree representation. More...

Public Member Functions

def root (self)
 
def leafes (self)
 
def amount_nodes (self)
 
def amount_entries (self)
 
def height (self)
 
def branch_factor (self)
 
def threshold (self)
 
def max_entries (self)
 
def type_measurement (self)
 
def __init__ (self, branch_factor, max_entries, threshold, type_measurement=measurement_type.CENTROID_EUCLIDEAN_DISTANCE)
 Create CF-tree. More...
 
def get_level_nodes (self, level)
 Traverses CF-tree to obtain nodes at the specified level. More...
 
def insert_point (self, point)
 Insert point that is represented by list of coordinates. More...
 
def insert (self, entry)
 Insert clustering feature to the tree. More...
 
def find_nearest_leaf (self, entry, search_node=None)
 Search nearest leaf to the specified clustering feature. More...
 

Detailed Description

CF-Tree representation.

A CF-tree is a height-balanced tree with two parameters: branching factor and threshold.

Definition at line 699 of file cftree.py.

Constructor & Destructor Documentation

◆ __init__()

def pyclustering.container.cftree.cftree.__init__ (   self,
  branch_factor,
  max_entries,
  threshold,
  type_measurement = measurement_type.CENTROID_EUCLIDEAN_DISTANCE 
)

Create CF-tree.

Parameters
[in]branch_factor(uint): Maximum number of children for non-leaf nodes.
[in]max_entries(uint): Maximum number of entries for leaf nodes.
[in]threshold(double): Maximum diameter of feature clustering for each leaf node.
[in]type_measurement(measurement_type): Measurement type that is used for calculation distance metrics.

Definition at line 788 of file cftree.py.

Member Function Documentation

◆ amount_entries()

def pyclustering.container.cftree.cftree.amount_entries (   self)
Returns
(uint) Number of entries in the tree.

Definition at line 734 of file cftree.py.

◆ amount_nodes()

def pyclustering.container.cftree.cftree.amount_nodes (   self)
Returns
(unit) Number of nodes (leaf and non-leaf) in the tree.

Definition at line 725 of file cftree.py.

◆ branch_factor()

def pyclustering.container.cftree.cftree.branch_factor (   self)
Returns
(uint) Branching factor of the tree.

Branching factor defines maximum number of successors in each non-leaf node.

Definition at line 752 of file cftree.py.

◆ find_nearest_leaf()

def pyclustering.container.cftree.cftree.find_nearest_leaf (   self,
  entry,
  search_node = None 
)

Search nearest leaf to the specified clustering feature.

Parameters
[in]entry(cfentry): Clustering feature.
[in]search_node(cfnode): Node from that searching should be started, if None then search process will be started for the root.
Returns
(leaf_node) Nearest node to the specified clustering feature.

Definition at line 895 of file cftree.py.

Referenced by pyclustering.container.cftree.cftree.find_nearest_leaf().

◆ get_level_nodes()

def pyclustering.container.cftree.cftree.get_level_nodes (   self,
  level 
)

Traverses CF-tree to obtain nodes at the specified level.

Parameters
[in]level(uint): CF-tree level from that nodes should be returned.
Returns
(list) List of CF-nodes that are located on the specified level of the CF-tree.

Definition at line 818 of file cftree.py.

◆ height()

def pyclustering.container.cftree.cftree.height (   self)
Returns
(uint) Height of the tree.

Definition at line 743 of file cftree.py.

◆ insert()

def pyclustering.container.cftree.cftree.insert (   self,
  entry 
)

Insert clustering feature to the tree.

Parameters
[in]entry(cfentry): Clustering feature that should be inserted.

Definition at line 869 of file cftree.py.

Referenced by pyclustering.container.kdtree.kdtree.find_minimal_node(), and pyclustering.container.cftree.cftree.insert_point().

◆ insert_point()

def pyclustering.container.cftree.cftree.insert_point (   self,
  point 
)

Insert point that is represented by list of coordinates.

Parameters
[in]point(list): Point represented by list of coordinates that should be inserted to CF tree.

Definition at line 857 of file cftree.py.

◆ leafes()

def pyclustering.container.cftree.cftree.leafes (   self)
Returns
(list) List of all leaf nodes in the tree.

Definition at line 716 of file cftree.py.

◆ max_entries()

def pyclustering.container.cftree.cftree.max_entries (   self)
Returns
(uint) Maximum number of entries in each leaf node.

Definition at line 771 of file cftree.py.

◆ root()

def pyclustering.container.cftree.cftree.root (   self)
Returns
(cfnode) Root of the tree.

Definition at line 707 of file cftree.py.

◆ threshold()

def pyclustering.container.cftree.cftree.threshold (   self)
Returns
(double) Threshold of the tree that represents maximum diameter of sub-clusters that is formed by leaf node entries.

Definition at line 762 of file cftree.py.

◆ type_measurement()

def pyclustering.container.cftree.cftree.type_measurement (   self)
Returns
(measurement_type) Type that is used for measuring.

Definition at line 780 of file cftree.py.


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