Skip to main content

active-semi-supervised-clustering

Active semi-supervised clustering algorithms for scikit-learn.

Algorithms

Semi-supervised clustering

  • Seeded-KMeans
  • Constrainted-KMeans
  • COP-KMeans
  • Pairwise constrained K-Means (PCK-Means)
  • Metric K-Means (MK-Means)
  • Metric pairwise constrained K-Means (MPCK-Means)

Active learning of pairwise clustering

  • Explore & Consolidate
  • Min-max
  • Normalized point-based uncertainty (NPU) method

Installation

pip install active-semi-supervised-clustering

Usage

from sklearn import datasets, metrics
from active_semi_clustering.semi_supervised.pairwise_constraints import PCKMeans
from active_semi_clustering.active.pairwise_constraints import ExampleOracle, ExploreConsolidate, MinMax
X, y = datasets.load_iris(return_X_y=True)

First, obtain some pairwise constraints from an oracle.

# TODO implement your own oracle that will, for example, query a domain expert via GUI or CLI
oracle = ExampleOracle(y, max_queries_cnt=10)

active_learner = MinMax(n_clusters=3)
active_learner.fit(X, oracle=oracle)
pairwise_constraints = active_learner.pairwise_constraints_

Then, use the constraints to do the clustering.

clusterer = PCKMeans(n_clusters=3)
clusterer.fit(X, ml=pairwise_constraints[0], cl=pairwise_constraints[1])

Evaluate the clustering using Adjusted Rand Score.

metrics.adjusted_rand_score(y, clusterer.labels_)

Metadata

Release files for active-semi-supervised-clustering 0.0.1

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

Source distribution (sdist)

Source distribution for active-semi-supervised-clustering 0.0.1
File Size Uploaded Provenance Actions
active-semi-supervised-clustering-0.0.1.tar.gz 10.5 kB Without provenance Details for active-semi-supervised-clustering-0.0.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for active-semi-supervised-clustering 0.0.1
File Interpreter ABI Platform Actions
active_semi_supervised_clustering-0.0.1-py3-none-any.whl Python 3 none any Details for active_semi_supervised_clustering-0.0.1-py3-none-any.whl

Total release size: 50.7 kB

Release files / active-semi-supervised-clustering-0.0.1.tar.gz

Download URL active-semi-supervised-clustering-0.0.1.tar.gz
Size 10.5 kB
Tags Source
SHA-256 checksum
How to use checksums
5ce2b210988560754a3ca1ac33bc20f60174c7b700504418355ea09e6c149efc
BLAKE2b-256 checksum
How to use checksums
84cc8189ebe735cd7b6c53869775969d89c6fe2d68a872ddd1cc24df3a38d1ba
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/40.3.0 requests-toolbelt/0.8.0 tqdm/4.26.0 CPython/3.6.3

Release files / active_semi_supervised_clustering-0.0.1-py3-none-any.whl

Download URL active_semi_supervised_clustering-0.0.1-py3-none-any.whl
Size 40.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
754ab7082c5343a74c9f3089928348622bfc52147062049baa79c53aa584a566
BLAKE2b-256 checksum
How to use checksums
e5734eb6a2966b94de7ca401d87de4104015bf3c911df0434bd99e1eeac67a84
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/40.3.0 requests-toolbelt/0.8.0 tqdm/4.26.0 CPython/3.6.3

Security for active-semi-supervised-clustering 0.0.1

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.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.0.1 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