pyclustertend


Namepyclustertend JSON
Version 1.9.0 PyPI version JSON
download
home_pagehttps://github.com/lachhebo/pyclustertend
SummaryA package to assess cluster tendency for unsupervised learning
upload_time2024-12-18 12:27:29
maintainerNone
docs_urlNone
authorIsmaïl Lachheb
requires_python<3.13,>=3.10
licenseBSD-3-Clause
keywords cluster tendency clustering machine learning hopkins vat
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage
            # pyclustertend






[![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)
[![DOI](https://zenodo.org/badge/187477036.svg)](https://zenodo.org/badge/latestdoi/187477036)

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 :



- [x] Hopkins Statistics
- [x] VAT
- [x] iVAT

- [x] Metric based method (silhouette, calinksi, davies bouldin)

## Installation

```shell
    pip install pyclustertend
```

## Usage

### Example Hopkins

```python
    >>>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

```python
    >>>from sklearn import datasets
    >>>from pyclustertend import vat
    >>>from sklearn.preprocessing import scale
    >>>X = scale(datasets.load_iris().data)
    >>>vat(X)
```

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

### Example iVat

```python
    >>>from sklearn import datasets
    >>>from pyclustertend import ivat
    >>>from sklearn.preprocessing import scale
    >>>X = scale(datasets.load_iris().data)
    >>>ivat(X)
```

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

## 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. 

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/lachhebo/pyclustertend",
    "name": "pyclustertend",
    "maintainer": null,
    "docs_url": null,
    "requires_python": "<3.13,>=3.10",
    "maintainer_email": null,
    "keywords": "cluster tendency, clustering, machine learning, hopkins, VAT",
    "author": "Isma\u00efl Lachheb",
    "author_email": null,
    "download_url": "https://files.pythonhosted.org/packages/77/db/bbfa18cde766d1febd7aa28568514e50e942fe22f7e328eddc44a5622f20/pyclustertend-1.9.0.tar.gz",
    "platform": null,
    "description": "# pyclustertend\n\n\n\n\n\n\n[![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)\n[![DOI](https://zenodo.org/badge/187477036.svg)](https://zenodo.org/badge/latestdoi/187477036)\n\npyclustertend is a python package specialized in cluster tendency. Cluster tendency consist to assess if clustering algorithms are relevant for a dataset.\n\nThree methods for assessing cluster tendency are currently implemented and one additional method based on metrics obtained with a KMeans estimator :\n\n\n\n- [x] Hopkins Statistics\n- [x] VAT\n- [x] iVAT\n\n- [x] Metric based method (silhouette, calinksi, davies bouldin)\n\n## Installation\n\n```shell\n    pip install pyclustertend\n```\n\n## Usage\n\n### Example Hopkins\n\n```python\n    >>>from sklearn import datasets\n    >>>from pyclustertend import hopkins\n    >>>from sklearn.preprocessing import scale\n    >>>X = scale(datasets.load_iris().data)\n    >>>hopkins(X,150)\n    0.18950453452838564\n```\n\n### Example VAT\n\n```python\n    >>>from sklearn import datasets\n    >>>from pyclustertend import vat\n    >>>from sklearn.preprocessing import scale\n    >>>X = scale(datasets.load_iris().data)\n    >>>vat(X)\n```\n\n<img height=\"350\" src=\"https://raw.githubusercontent.com/lachhebo/pyclustertend/screenshots/vat.png\" />\n\n### Example iVat\n\n```python\n    >>>from sklearn import datasets\n    >>>from pyclustertend import ivat\n    >>>from sklearn.preprocessing import scale\n    >>>X = scale(datasets.load_iris().data)\n    >>>ivat(X)\n```\n\n<img height=\"350\" src=\"https://raw.githubusercontent.com/lachhebo/pyclustertend/screenshots/ivat.png\" />\n\n## Notes\n\nIt's preferable to scale the data before using hopkins or vat algorithm as they use distance between observations. Moreover, vat and ivat algorithms\ndo not really fit to massive databases. A first solution is to sample the data before using those algorithms. \n",
    "bugtrack_url": null,
    "license": "BSD-3-Clause",
    "summary": "A package to assess cluster tendency for unsupervised learning",
    "version": "1.9.0",
    "project_urls": {
        "Documentation": "https://pyclustertend.readthedocs.io/en/master/",
        "Homepage": "https://github.com/lachhebo/pyclustertend",
        "Repository": "https://github.com/lachhebo/pyclustertend"
    },
    "split_keywords": [
        "cluster tendency",
        " clustering",
        " machine learning",
        " hopkins",
        " vat"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "84a9243402489c298c33f4fc7c3f2146e737a570ca752161e030acab3d93d4ed",
                "md5": "7bbf4e9e738a39fb5a6dc895a55fb470",
                "sha256": "2454a31be39fd7c8fc4245bb1b6c74b4fb6981a40a10b02ea72d7bf5349000f9"
            },
            "downloads": -1,
            "filename": "pyclustertend-1.9.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "7bbf4e9e738a39fb5a6dc895a55fb470",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<3.13,>=3.10",
            "size": 7162,
            "upload_time": "2024-12-18T12:27:27",
            "upload_time_iso_8601": "2024-12-18T12:27:27.726392Z",
            "url": "https://files.pythonhosted.org/packages/84/a9/243402489c298c33f4fc7c3f2146e737a570ca752161e030acab3d93d4ed/pyclustertend-1.9.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "77dbbbfa18cde766d1febd7aa28568514e50e942fe22f7e328eddc44a5622f20",
                "md5": "e9b2f5dd32923f4241a10938577c3f9a",
                "sha256": "45f9bcc47be6c9276530dfed1db68980e837eeda2709b16f1c9311de1b31836c"
            },
            "downloads": -1,
            "filename": "pyclustertend-1.9.0.tar.gz",
            "has_sig": false,
            "md5_digest": "e9b2f5dd32923f4241a10938577c3f9a",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<3.13,>=3.10",
            "size": 5825,
            "upload_time": "2024-12-18T12:27:29",
            "upload_time_iso_8601": "2024-12-18T12:27:29.757538Z",
            "url": "https://files.pythonhosted.org/packages/77/db/bbfa18cde766d1febd7aa28568514e50e942fe22f7e328eddc44a5622f20/pyclustertend-1.9.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-12-18 12:27:29",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "lachhebo",
    "github_project": "pyclustertend",
    "travis_ci": false,
    "coveralls": true,
    "github_actions": true,
    "lcname": "pyclustertend"
}
        
Elapsed time: 0.52391s