Skip to content

Commit be3d11e

Browse files
committed
Updated README
1 parent 88364d5 commit be3d11e

1 file changed

Lines changed: 50 additions & 32 deletions

File tree

README.md

Lines changed: 50 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,64 +1,60 @@
11
# pyclustertend
22

3-
4-
5-
6-
7-
83
[![Build Status](https://travis-ci.com/lachhebo/pyclustertend.svg?branch=master)](https://travis-ci.com/lachhebo/pyclustertend) [![PyPi Status](https://img.shields.io/pypi/v/pyclustertend.svg?color=brightgreen)](https://pypi.org/project/pyclustertend/) [![Documentation Status](https://readthedocs.org/projects/pyclustertend/badge/?version=master)](https://pyclustertend.readthedocs.io/en/master/) [![Downloads](https://pepy.tech/badge/pyclustertend)](https://pepy.tech/project/pyclustertend) [![codecov](https://codecov.io/gh/lachhebo/pyclustertend/branch/master/graph/badge.svg)](https://codecov.io/gh/lachhebo/pyclustertend)
94
[![DOI](https://zenodo.org/badge/187477036.svg)](https://zenodo.org/badge/latestdoi/187477036)
105

11-
pyclustertend is a python package specialized in cluster tendency. Cluster tendency consist to assess if clustering algorithms are relevant for a dataset.
12-
13-
Three methods for assessing cluster tendency are currently implemented and one additional method based on metrics obtained with a KMeans estimator :
6+
pyclustertend is a Python package specialized in cluster tendency. Cluster tendency consist to assess if clustering algorithms are relevant for a dataset.
147

15-
16-
17-
- [x] Hopkins Statistics
18-
- [x] VAT
19-
- [x] iVAT
20-
21-
- [x] Metric based method (silhouette, calinksi, davies bouldin)
8+
Three methods for assessing cluster tendency are currently implemented and one additional method based on metrics obtained with a KMeans estimator:
9+
- Hopkins Statistics [^1]
10+
- VAT [^5]
11+
- iVAT [^6]
12+
- Metric based method (Silhouette [^2], Calinski-Harabasz [^3], Davies-Bouldin [^4])
2213

2314
## Installation
24-
15+
To install the Python 3.14 compatible version of `pyclustertend`, you can use `pip` to install directly from the GitHub repository. Run the following command in your terminal:
16+
```shell
17+
pip install git+https://github.com/Alessi0X/pyclustertend-fork.git@upgrade-python-3.14
18+
```
19+
or, for the Python 3.13 compatible version:
2520
```shell
26-
pip install pyclustertend
21+
pip install git+https://github.com/Alessi0X/pyclustertend-fork.git@upgrade-python-3.13
2722
```
23+
For info about the branches, please refer to the Acknowledgments section below.
2824

2925
## Usage
3026

3127
### Example Hopkins
3228

3329
```python
34-
>>>from sklearn import datasets
35-
>>>from pyclustertend import hopkins
36-
>>>from sklearn.preprocessing import scale
37-
>>>X = scale(datasets.load_iris().data)
38-
>>>hopkins(X,150)
30+
>>> from sklearn import datasets
31+
>>> from pyclustertend import hopkins
32+
>>> from sklearn.preprocessing import scale
33+
>>> X = scale(datasets.load_iris().data)
34+
>>> hopkins(X,150)
3935
0.18950453452838564
4036
```
4137

4238
### Example VAT
4339

4440
```python
45-
>>>from sklearn import datasets
46-
>>>from pyclustertend import vat
47-
>>>from sklearn.preprocessing import scale
48-
>>>X = scale(datasets.load_iris().data)
49-
>>>vat(X)
41+
>>> from sklearn import datasets
42+
>>> from pyclustertend import vat
43+
>>> from sklearn.preprocessing import scale
44+
>>> X = scale(datasets.load_iris().data)
45+
>>> vat(X)
5046
```
5147

5248
<img height="350" src="https://raw.githubusercontent.com/lachhebo/pyclustertend/screenshots/vat.png" />
5349

5450
### Example iVat
5551

5652
```python
57-
>>>from sklearn import datasets
58-
>>>from pyclustertend import ivat
59-
>>>from sklearn.preprocessing import scale
60-
>>>X = scale(datasets.load_iris().data)
61-
>>>ivat(X)
53+
>>> from sklearn import datasets
54+
>>> from pyclustertend import ivat
55+
>>> from sklearn.preprocessing import scale
56+
>>> X = scale(datasets.load_iris().data)
57+
>>> ivat(X)
6258
```
6359

6460
<img height="350" src="https://raw.githubusercontent.com/lachhebo/pyclustertend/screenshots/ivat.png" />
@@ -67,3 +63,25 @@ Three methods for assessing cluster tendency are currently implemented and one a
6763

6864
It's preferable to scale the data before using hopkins or vat algorithm as they use distance between observations. Moreover, vat and ivat algorithms
6965
do not really fit to massive databases. A first solution is to sample the data before using those algorithms.
66+
67+
## Acknowledgments
68+
69+
This is a fork of the original [pyclustertend](https://github.com/lachhebo/pyclustertend) library by [Ismaïl Lachheb](https://github.com/lachhebo). The original library got somehow abandoned, and I decided to fork it and continue its development, especially in terms of compatibility with the latest versions of Python. This fork is structured as follows:
70+
- The original codebase is preserved in the `master` branch
71+
- The `upgrade-python-3.13` branch features updates to ensure compatibility with Python 3.13
72+
- The `upgrade-python-3.14` branch includes further updates for compatibility with Python 3.14
73+
74+
Thank you to Ismaïl Lachheb for creating the original `pyclustertend` library!
75+
76+
77+
[^1]: Hopkins, Brian; Skellam, J.G. (1954). "A new method for determining the type of distribution of plant individuals". _Annals of Botany_. **18** (2). Annals Botany Co: 213–227. doi:10.1093/oxfordjournals.aob.a083391
78+
79+
[^2]: Rousseeuw, Peter J. (1987). "Silhouettes: a Graphical Aid to the Interpretation and Validation of Cluster Analysis". _Computational and Applied Mathematics_. **20**: 53–65. doi:10.1016/0377-0427(87)90125-7.
80+
81+
[^3]: Caliński, Tadeusz; Harabasz, Jerzy (1974). "A dendrite method for cluster analysis". _Communications in Statistics_. **3** (1): 1–27. doi:10.1080/03610927408827101
82+
83+
[^4]: Davies, David L.; Bouldin, Donald W. (1979). "A Cluster Separation Measure". _IEEE Transactions on Pattern Analysis and Machine Intelligence_. PAMI-1 (2): 224–227. doi:10.1109/TPAMI.1979.4766909
84+
85+
[^5]: Bezdek, James C.; Hathaway, Richard J. (2002). "VAT: A Tool for Visual Assessment of (Cluster) Tendency". _Proceedings of the 2002 International Joint Conference on Neural Networks_. IJCNN '02. IEEE Computer Society. pp. 2225–2230. doi:10.1109/IJCNN.2002.1007487.
86+
87+
[^6]: Wang, L., Nguyen, U. T., Bezdek, J. C., Leckie, C. A., Ramamohanarao, K. (2010). "iVAT and aVAT: enhanced visual analysis for cluster tendency assessment". In _Advances in Knowledge Discovery and Data Mining. PAKDD 2010_ (pp. 16-27). Berlin, Heidelberg: Springer Berlin Heidelberg. doi:10.1007/978-3-642-13657-3_5.

0 commit comments

Comments
 (0)