Cluster

Latest version: v1.4.1.post3

Safety actively analyzes 630052 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 3 of 3

1.1.1b2

===============

* Fixed bug 1604859 (thanks to Willi Richert for reporting it)

1.1.1b1

===============

* Applied SVN patch [1535137] (thanks ajaksu)

* Topology output supported
* ``data`` and ``raw_data`` are now properties.

1.1.0b1

===============

* KMeans Clustering implemented for simple numeric tuples.

Data in the form ``[(1,1), (2,1), (5,3), ...]`` can be clustered.

Usage::

>>> from cluster import KMeansClustering
>>> cl = KMeansClustering([(1,1), (2,1), (5,3), ...])
>>> clusters = cl.getclusters(2)

The method ``getclusters`` takes the amount of clusters you would like to
have as parameter.

Only numeric values are supported in the tuples. The reason for this is
that the "centroid" method which I use, essentially returns a tuple of
floats. So you will lose any other kind of metadata. Once I figure out a
way how to recode that method, other types should be possible.

1.0.1b2

===============

* Optimized calculation of the hierarchical clustering by using the fact, that
the generated matrix is symmetrical.

1.0.1b1

===============

* Implemented complete-, average-, and uclus-linkage methods. You can select
one by specifying it in the constructor, for example::

cl = HierarchicalClustering(data, distfunc, linkage='uclus')

or by setting it before starting the clustering process::

cl = HierarchicalClustering(data, distfunc)
cl.setLinkageMethod('uclus')
cl.cluster()

* Clustering is not executed on object creation, but on the first call of
``getlevel``. You can force the creation of the clusters by calling the
``cluster`` method as shown above.

.. vim: filetype=rst :

Page 3 of 3

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.