In this repository, the following classes and functions are implemented
- KMeans clustering class
- Agglomerative clustering class
- Silhouette score function
- Jaccard Index function
The classes and functions are distributed into the following modules -
- cluster : It contains KMeans and Agglomerative classes
- metrics : It contains Silhouette score and Jaccard Index computation functions
- utils : It contains a function named export which is used to export the results of clustering into a file
To know how to use them, go through driver.ipynb
Clone this repository with git clone https://github.com/duttaprasanta/clustering.git
. You may also download this repository as zip file and extract it.
Run the python files by installing required packages. For running the ipynb files you need to install jupter notebook or jupyter lab or visual studio code (an extension is needed). You may also run it by uploading into Google Colab.
If you stuck, with dependency conflicts, you can create a virtual environment and activate it by doing the following -
pip install virtualenv
virtualenv env
source env/bin/activate
pip install -r requirements.txt
Deactivate all the activated environment before doing the previous step. In case of conda, deactivate it using conda deactivate
. In case of pip, do deactivate
.
- Project website : https://duttaprasanta.github.io/clustering/
- Project link : https://github.com/duttaprasanta/clustering
- Email : prasanta7dutta@gmail.com