pyclustering
0.10.1
pyclustring is a Python, C++ data mining library.
|
KD-tree visualizer that provides service to display graphical representation of the tree using matplotlib
library.
More...
Public Member Functions | |
def | __init__ (self, kdtree_instance) |
Initialize KD-tree visualizer. More... | |
def | visualize (self) |
Visualize KD-tree using plot in 2-dimensional data-space. | |
KD-tree visualizer that provides service to display graphical representation of the tree using matplotlib
library.
The visualizer is able to visualize 2D KD-trees only.
There is an example how to visualize balanced KD-tree for TwoDiamonds
sample using kdtree_visualizer
:
Output result of the example above (balanced tree) - figure 1:
There is one more example to demonstrate unbalanced KD-tree. kdtree
class is child class of kdtree_balanced
that allows to add points step by step and thus an unbalanced KD-tree can be built.
Output result of the example above (unbalanced tree) - figure 2:
def pyclustering.container.kdtree.kdtree_visualizer.__init__ | ( | self, | |
kdtree_instance | |||
) |