pyclustertend
pyclustertend is a python package specialized in cluster tendency. Cluster tendency consist to assess if clustering algorithms are relevant for a dataset.
Three methods for assessing cluster tendency are currently implemented and one additional method based on metrics obtained with a KMeans estimator :
-
Hopkins Statistics
-
VAT
-
iVAT
-
Metric based method (silhouette, calinksi, davies bouldin)
Installation
pip install pyclustertend
Usage
Example Hopkins
>>>from sklearn import datasets
>>>from pyclustertend import hopkins
>>>from sklearn.preprocessing import scale
>>>X = scale(datasets.load_iris().data)
>>>hopkins(X,150)
0.18950453452838564
Example VAT
>>>from sklearn import datasets
>>>from pyclustertend import vat
>>>from sklearn.preprocessing import scale
>>>X = scale(datasets.load_iris().data)
>>>vat(X)
Example iVat
>>>from sklearn import datasets
>>>from pyclustertend import ivat
>>>from sklearn.preprocessing import scale
>>>X = scale(datasets.load_iris().data)
>>>ivat(X)
Notes
It's preferable to scale the data before using hopkins or vat algorithm as they use distance between observations. Moreover, vat and ivat algorithms do not really fit to massive databases. A first solution is to sample the data before using those algorithms.
Metadata
Release files for pyclustertend 1.9.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| pyclustertend-1.9.0.tar.gz | 5.8 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pyclustertend-1.9.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 13.0 kB
Release files / pyclustertend-1.9.0.tar.gz
| Download URL | pyclustertend-1.9.0.tar.gz |
|---|---|
| Size | 5.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
45f9bcc47be6c9276530dfed1db68980e837eeda2709b16f1c9311de1b31836c
|
|
BLAKE2b-256 checksum How to use checksums |
77dbbbfa18cde766d1febd7aa28568514e50e942fe22f7e328eddc44a5622f20
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.8.5 CPython/3.10.12 Linux/6.5.0-1025-azure
|
Release files / pyclustertend-1.9.0-py3-none-any.whl
| Download URL | pyclustertend-1.9.0-py3-none-any.whl |
|---|---|
| Size | 7.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
2454a31be39fd7c8fc4245bb1b6c74b4fb6981a40a10b02ea72d7bf5349000f9
|
|
BLAKE2b-256 checksum How to use checksums |
84a9243402489c298c33f4fc7c3f2146e737a570ca752161e030acab3d93d4ed
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.8.5 CPython/3.10.12 Linux/6.5.0-1025-azure
|