Skip to main content

Tool for clustering, analyzing, and benchmarking text data with advanced embeddings and statistical validation.

Project description

Clusterium

CI codecov Documentation Status

A toolkit for clustering, analyzing, and benchmarking text data using state-of-the-art embedding models and clustering algorithms.

Features

  • Dirichlet Process Clustering: Implements the Dirichlet Process for text clustering
  • Pitman-Yor Process Clustering: Implements the Pitman-Yor Process for text clustering with improved performance
  • Evaluation: Evaluates clustering results using a variety of metrics, including Silhouette Score, Davies-Bouldin Index, and Power-law Analysis
  • Visualization: Generates plots of cluster size distributions

Installation

For detailed installation instructions, please see the Installation Guide.

Quick Start

git clone https://github.com/sergeyklay/clusterium.git
cd clusterium
poetry install

Usage

For detailed usage instructions, use cases, examples, and advanced configuration options, please see the Usage Guide.

Quick Start

# Run clustering
clusx --input your_data.csv --column your_column --output clusters.csv

# Evaluate clustering results and generate visualizations
clusx evaluate \
  --input input.csv \
  --column your_column \
  --dp-clusters output_dp.csv \
  --pyp-clusters output_pyp.csv \
  --plot

Python API Example

from clusx.clustering import DirichletProcess
from clusx.clustering.utils import load_data_from_csv, save_clusters_to_json

# Load data
texts, data = load_data_from_csv("your_data.csv", column="your_column")

# Perform clustering
dp = DirichletProcess(alpha=1.0)
clusters, params = dp.fit(texts)

# Save results
save_clusters_to_json("clusters.json", texts, clusters, "DP", data)

Documentation

Full documentation is available at https://clusterium.readthedocs.io/.

License

This project is licensed under the MIT License - see the LICENSE file for details.

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

clusx-0.3.1.tar.gz (30.5 kB view details)

Uploaded Source

Built Distribution

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

clusx-0.3.1-py3-none-any.whl (27.5 kB view details)

Uploaded Python 3

File details

Details for the file clusx-0.3.1.tar.gz.

File metadata

  • Download URL: clusx-0.3.1.tar.gz
  • Upload date:
  • Size: 30.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for clusx-0.3.1.tar.gz
Algorithm Hash digest
SHA256 26c32372b2db0ce08d0f640ab4feeba31dc3dd619521b362ea4a2a9a51936739
MD5 6417d3b98759a72fb6e7c18539eb8dbe
BLAKE2b-256 3c7c8428a5287d153e668ad6a392c35d459a94328f1de6b50459c6099f95aeac

See more details on using hashes here.

File details

Details for the file clusx-0.3.1-py3-none-any.whl.

File metadata

  • Download URL: clusx-0.3.1-py3-none-any.whl
  • Upload date:
  • Size: 27.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for clusx-0.3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 805ab9a3c4dbd657f1a9bf99792ef185fb6d81c744de0b692f9b439d79b9b8c0
MD5 5234857216222ebf97fde57d96ce1945
BLAKE2b-256 4247468ffdff4b823db0e7137aa4383a186ef21bb08c22925b8fe59e0038fcf5

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