Skip to main content

The PyClustKit Module: All about clustering in a single Python Module!

The pyclustkit module is built on top of various libraries to enable many clustering operations. Currently, the module is built for clustering evaluation and meta-learning.

Table of Contents

Installation Instructions

The pyclustkit is available to download with pypi

pip install pyclustkit

I

Useful Links

Usage Examples

Calculating Internal Cluster Validity Indices (CVI)

PyClustKit comes with an evaluation suite of 46 internal validity indices. Each is implemented on top of numpy and, the module incorporates specific methods for speeding up the execution of multiple CVI by implementing a shared process tracking.

from pyclustkit.eval import CVIToolbox 

ct = CVIToolbox(X,y)
ct.calculate_icvi(cvi=["dunn", "silhouette"]) # if no CVI are specified it defaults to 'all'.
print(ct.cvi_results)

Meta Learning

Meta-Feature Extraction

PyClustKit comes with an evaluation suite of 46 internal validity indices. Each is implemented on top of numpy and, the module incorporates specific methods for speeding up the execution of multiple CVI by implementing a shared process tracking.

from pyclustkit.eval import CVIToolbox 

ct = CVIToolbox(X,y)
ct.calculate_icvi(cvi=["dunn", "silhouette"]) # if no CVI are specified it defaults to 'all'.
print(ct.cvi_results)

Citing This Work

List of Implemented CVI with citations Currently the collection consists of the following internal CVIs. R does not do gdi 61,62,63 due to hausdorff:
  1. ball_hall: G. H. Ball and D. J. Hall. Isodata: A novel method of data analysis and pattern classification. Menlo Park: Stanford Research Institute. (NTIS No. AD 699616),1965.

  2. banfeld_raftery: J.D. Banfield and A.E. Raftery. Model-based gaussian and non-gaussian clustering. Biometrics, 49:803–821, 1993.

  3. c_index: Hubert, Lawrence & Levin, Joel. (1976). A general statistical framework for assessing categorical clustering in free recall. Psychological Bulletin. 83. 1072-1080. 10.1037/0033-2909.83.6.1072.

  4. CDbw : Halkidi, M., & Vazirgiannis, M. (2008). A density-based cluster validity approach using multi-representatives. Pattern Recognit. Lett., 29, 773-786.

  5. det_ratio : A. J. Scott and M. J. Symons. Clustering methods based on likelihood ratio criteria. Biometrics, 27:387–397, 1971.

  6. Dunn Index : J. Dunn. Well separated clusters and optimal fuzzy partitions. Journal of Cybernetics, 4:95–104, 1974.

  7. GDI [11,21,31,41,51,61][12,22,32,42,52,62][13,23,33,43,53,63]: J. C. Bezdek and N. R. Pal. Some new indexes of cluster validity. IEEE Transactions on Systems, Man, and CyberneticsÑPART B: CYBERNETICS, 28, no.3:301–315, 1998.

  8. ksq_detw: F. H. B. Marriot. Practical problems in a method of cluster analysis. Biometrics, 27:456–460, 1975.

  9. log_det_ratio: Halkidi et al. On clustering validation techniques. J. Intell. Inf. Syst., 2001.

  10. log_ss_ratio: J. A. Hartigan. Clustering algorithms. New York: Wiley, 1975.

  11. McClain_Rao: J. O. McClain and V. R. Rao. Clustisz: A program to test for the quality of clustering of a set of objects. Journal of Marketing Research, 12:456–460, 1975.

  12. trace_w Index

  13. Friedman-Rudin 1 Index

  14. Friedman-Rudin 2 Index

  15. S_dbw: M. Halkidi and M. Vazirgiannis, "Clustering validity assessment: finding the optimal partitioning of a data set," Proceedings 2001 IEEE International Conference on Data Mining.

  16. sd_dis Index: Halkidi et al. On clustering validation techniques. J. Intell. Inf. Syst., 2001.

  17. sd_scat Index: Halkidi et al. On clustering validation techniques. J. Intell. Inf. Syst., 2001.

  18. pbm: Bandyopadhyay S. Pakhira M. K. and Maulik U. Validity index for crisp and fuzzy clusters. Pattern Recognition, 2004.

  19. ratkowsky_lance

  20. ray_turi: Ray et al. Determination of number of clusters in k-means clustering and application in colour image segmentation. 4th International Conference on Advances in Pattern Recognition and Digital Techniques, 1999.

  21. wemmert_gancarski

  22. xie_beni: X.L. Xie and G. Beni. A validity measure for fuzzy clustering. IEEE Transactions on Pattern Analysis and Machine Intelligence, 1991.

  23. banfeld_raftery

  24. trace_wib

  25. log_det_ratio

  26. point_biserial

  27. calinski_harabasz

  28. silhouette

  29. davies_bouldin

  30. scott_symons

Metadata

Release files for pyclust-evl 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pyclust-evl 0.1.0
File Size Uploaded Provenance
pyclust_evl-0.1.0.tar.gz 44.7 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for pyclust-evl 0.1.0
File Interpreter ABI Platform
pyclust_evl-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 99.2 kB

Release files / pyclust_evl-0.1.0.tar.gz

Download URL pyclust_evl-0.1.0.tar.gz
Size 44.7 kB
Tags Source
SHA-256 checksum
How to use checksums
678981305d8fdbdae2f4333bdb1a2f263ed239c64c77f68627f8652d6002dde9
BLAKE2b-256 checksum
How to use checksums
dcd4b0ba4712fc323ee7379648fabee8f6fe62ac4976050cca4c1584dfe5fe4c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.0.1 CPython/3.12.7

Release files / pyclust_evl-0.1.0-py3-none-any.whl

Download URL pyclust_evl-0.1.0-py3-none-any.whl
Size 54.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
24433de6f41346fe55b27229c0b83ea7ed678b3f78d30652151ae3c8438a9be4
BLAKE2b-256 checksum
How to use checksums
b64b539bc1e8206dcb69df9a75e9c81e832a5796b3ca66463b384a882f91dc3b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.0.1 CPython/3.12.7

Security for pyclust-evl 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page