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.9.0.tar.gz (5.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: pyclustertend-1.9.0.tar.gz
  • Upload date:
  • Size: 5.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.5 CPython/3.10.12 Linux/6.5.0-1025-azure

File hashes

Hashes for pyclustertend-1.9.0.tar.gz
Algorithm Hash digest
SHA256 45f9bcc47be6c9276530dfed1db68980e837eeda2709b16f1c9311de1b31836c
MD5 e9b2f5dd32923f4241a10938577c3f9a
BLAKE2b-256 77dbbbfa18cde766d1febd7aa28568514e50e942fe22f7e328eddc44a5622f20

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pyclustertend-1.9.0-py3-none-any.whl
  • Upload date:
  • Size: 7.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.5 CPython/3.10.12 Linux/6.5.0-1025-azure

File hashes

Hashes for pyclustertend-1.9.0-py3-none-any.whl
Algorithm Hash digest
SHA256 2454a31be39fd7c8fc4245bb1b6c74b4fb6981a40a10b02ea72d7bf5349000f9
MD5 7bbf4e9e738a39fb5a6dc895a55fb470
BLAKE2b-256 84a9243402489c298c33f4fc7c3f2146e737a570ca752161e030acab3d93d4ed

See more details on using hashes here.

Supported by

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