pyclustering  0.10.1
pyclustring is a Python, C++ data mining library.
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 684 of file

Constructor & Destructor Documentation

◆ __init__()

def pyclustering.container.cftree.cftree.__init__ (   self,
  type_measurement = measurement_type.CENTROID_EUCLIDEAN_DISTANCE 

Create CF-tree.

[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 773 of file

Member Function Documentation

◆ amount_entries()

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

Definition at line 719 of file

◆ amount_nodes()

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

Definition at line 710 of file

◆ branch_factor()

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

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

Definition at line 737 of file

◆ find_nearest_leaf()

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

Search nearest leaf to the specified clustering feature.

[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.
(leaf_node) Nearest node to the specified clustering feature.

Definition at line 880 of file

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

◆ get_level_nodes()

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

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

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

Definition at line 803 of file

◆ height()

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

Definition at line 728 of file

◆ insert()

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

Insert clustering feature to the tree.

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

Definition at line 854 of file

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

◆ insert_point()

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

Insert point that is represented by list of coordinates.

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

Definition at line 842 of file

◆ leafes()

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

Definition at line 701 of file

◆ max_entries()

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

Definition at line 756 of file

◆ root()

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

Definition at line 692 of file

◆ threshold()

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

Definition at line 747 of file

◆ type_measurement()

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

Definition at line 765 of file

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