pyclustering  0.10.1
pyclustring is a Python, C++ data mining library.
pyclustering.container.cftree.cfentry Class Reference

Clustering feature representation. More...

Public Member Functions

def number_points (self)
 Returns number of points that are encoded. More...
 
def linear_sum (self)
 Returns linear sum. More...
 
def square_sum (self)
 Returns square sum. More...
 
def __init__ (self, number_points, linear_sum, square_sum)
 CF-entry constructor. More...
 
def __copy__ (self)
 
def __repr__ (self)
 
def __str__ (self)
 Default cfentry string representation.
 
def __add__ (self, entry)
 Overloaded operator add. More...
 
def __eq__ (self, entry)
 Overloaded operator eq. More...
 
def get_distance (self, entry, type_measurement)
 Calculates distance between two clusters in line with measurement type. More...
 
def get_centroid (self)
 Calculates centroid of cluster that is represented by the entry. More...
 
def get_radius (self)
 Calculates radius of cluster that is represented by the entry. More...
 
def get_diameter (self)
 Calculates diameter of cluster that is represented by the entry. More...
 

Detailed Description

Clustering feature representation.

See also
cfnode
cftree

Definition at line 66 of file cftree.py.

Constructor & Destructor Documentation

◆ __init__()

def pyclustering.container.cftree.cfentry.__init__ (   self,
  number_points,
  linear_sum,
  square_sum 
)

CF-entry constructor.

Parameters
[in]number_points(uint): Number of objects that is represented by the entry.
[in]linear_sum(list): Linear sum of values that represent objects in each dimension.
[in]square_sum(double): Square sum of values that represent objects.

Definition at line 107 of file cftree.py.

Member Function Documentation

◆ __add__()

def pyclustering.container.cftree.cfentry.__add__ (   self,
  entry 
)

Overloaded operator add.

Performs addition of two clustering features.

Parameters
[in]entry(cfentry): Entry that is added to the current.
Returns
(cfentry) Result of addition of two clustering features.

Definition at line 151 of file cftree.py.

◆ __copy__()

def pyclustering.container.cftree.cfentry.__copy__ (   self)
Returns
(cfentry) Makes copy of the CF-entry instance.

Definition at line 126 of file cftree.py.

◆ __eq__()

def pyclustering.container.cftree.cfentry.__eq__ (   self,
  entry 
)

Overloaded operator eq.

Performs comparison of two clustering features.

Parameters
[in]entry(cfentry): Entry that is used for comparison with current.
Returns
(bool) True is both clustering features are equals in line with tolerance, otherwise False.

Definition at line 168 of file cftree.py.

◆ __repr__()

def pyclustering.container.cftree.cfentry.__repr__ (   self)

◆ get_centroid()

def pyclustering.container.cftree.cfentry.get_centroid (   self)

Calculates centroid of cluster that is represented by the entry.

It's calculated once when it's requested after the last changes.

Returns
(array_like) Centroid of cluster that is represented by the entry.

Definition at line 224 of file cftree.py.

Referenced by pyclustering.container.cftree.cfentry.get_distance(), and pyclustering.container.cftree.cfentry.get_radius().

◆ get_diameter()

def pyclustering.container.cftree.cfentry.get_diameter (   self)

Calculates diameter of cluster that is represented by the entry.

It's calculated once when it's requested after the last changes.

Returns
(double) Diameter of cluster that is represented by the entry.

Definition at line 263 of file cftree.py.

Referenced by pyclustering.container.cftree.cfentry.__repr__().

◆ get_distance()

def pyclustering.container.cftree.cfentry.get_distance (   self,
  entry,
  type_measurement 
)

Calculates distance between two clusters in line with measurement type.

In case of usage CENTROID_EUCLIDIAN_DISTANCE square euclidian distance will be returned. Square root should be taken from the result for obtaining real euclidian distance between entries.

Parameters
[in]entry(cfentry): Clustering feature to which distance should be obtained.
[in]type_measurement(measurement_type): Distance measurement algorithm between two clusters.
Returns
(double) Distance between two clusters.

Definition at line 190 of file cftree.py.

◆ get_radius()

def pyclustering.container.cftree.cfentry.get_radius (   self)

Calculates radius of cluster that is represented by the entry.

It's calculated once when it's requested after the last changes.

Returns
(double) Radius of cluster that is represented by the entry.

Definition at line 240 of file cftree.py.

◆ linear_sum()

◆ number_points()

def pyclustering.container.cftree.cfentry.number_points (   self)

◆ square_sum()

def pyclustering.container.cftree.cfentry.square_sum (   self)

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