Skip to main content

A package to assess cluster tendency for unsupervised learning

Project description

pyclustertend

Build Status PyPi Status Documentation Status Downloads codecov DOI

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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pyclustertend-1.8.2.tar.gz (6.2 kB view details)

Uploaded Source

Built Distribution

pyclustertend-1.8.2-py3-none-any.whl (7.2 kB view details)

Uploaded Python 3

File details

Details for the file pyclustertend-1.8.2.tar.gz.

File metadata

  • Download URL: pyclustertend-1.8.2.tar.gz
  • Upload date:
  • Size: 6.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.2.2 CPython/3.8.10 Linux/5.15.0-1022-azure

File hashes

Hashes for pyclustertend-1.8.2.tar.gz
Algorithm Hash digest
SHA256 a78ee489d895f43be66ede4daa58526f905e5c9172f18f76ff06dde0fc9cab1a
MD5 d6fd5a693c8a5be8d99444cf63c39d9c
BLAKE2b-256 04a50d0043f93d9d499c720866e9eba068da9d76ca9d519a22fd008913abf74e

See more details on using hashes here.

File details

Details for the file pyclustertend-1.8.2-py3-none-any.whl.

File metadata

  • Download URL: pyclustertend-1.8.2-py3-none-any.whl
  • Upload date:
  • Size: 7.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.2.2 CPython/3.8.10 Linux/5.15.0-1022-azure

File hashes

Hashes for pyclustertend-1.8.2-py3-none-any.whl
Algorithm Hash digest
SHA256 81559f70370bfee01a113ceeb2a5eb8ab2db5524cc9f81e5af6262cc222c9589
MD5 daf97491dde2a44d869f1f5c72be53e3
BLAKE2b-256 1201a0f8af33e9cdc6dc57ddf6399624caafc4b5e69ffd3c8988232202864989

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page