Skip to main content

Documentation Status version Python codecov license Downloads

scikit-query

Clustering aims to group data into clusters without the help of labels, unlike classification algorithms. A well-known shortcoming of clustering algorithms is that they rely on an objective function geared toward specific types of clusters (convex, dense, well-separated), and hyperparameters that are hard to tune. Semi-supervised clustering mitigates these problems by injecting background knowledge in order to guide the clustering. Active clustering algorithms analyze the data to select interesting points to ask the user about, generating constraints that allow fast convergence towards a user-specified partition.

scikit-query is a library of active query strategies for constrained clustering inspired by scikit-learn and the now inactive active-semi-supervised-clustering library by Jakub Švehla.

It is focused on algorithm-agnostic query strategies, i.e. methods that do not rely on a particular clustering algorithm. From an input dataset, they produce a set of constraints by making insightful queries to an oracle. A variant for incremental constrained clustering is provided for applicable algorithms, taking a data partition into account.

In typical scikit way, the library is used by instanciating a class and using its fit method.

from skquery.pairwise import AIPC
from skquery.oracle import MLCLOracle

qs = AIPC()
oracle = MLCLOracle(truth=labels, budget=10)
constraints = qs.fit(dataset, oracle)

Algorithms

Algorithm Description Constraint type Works in incremental setting ? Source Date
Random sampling ML/CL, triplet ✔️
FFQS Neighborhood-based ML/CL ✔️ Basu et al. 2004
MMFFQS (MinMax) Neighborhood-based, similarity ML/CL ✔️ Mallapragada et al. 2008
NPU Neighborhood-based, information theory ML/CL ✔️ Xiong et al. 2013
SASC SVDD, greedy approach ML/CL Abin & Beigy 2014
AIPC Fuzzy clustering, information theory ML/CL Zhang et al. 2019

Dependencies

scikit-query is developed on Python >= 3.10, and requires the following libraries :

  • pandas>=2.0.1
  • matplotlib>=3.7.1
  • numpy>=1.24.3
  • scikit-learn>=1.2.2
  • cvxopt>=1.3.1
  • scikit-fuzzy>=0.4.2
  • scipy>=1.10.1
  • plotly>=5.14.1

Contributors

FFQS, MinMax and NPU are based upon Jakub Švehla's implementation. Other algorithms have been implemented by Aymeric Beauchamp or his students from the University of Orléans :

  • Salma Badri, Elis Ishimwe, Brice Jacquesson, Matthéo Pailler (2023)

Metadata

Release files for scikit-query 0.4.2

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

Source distribution (sdist)

Source distribution for scikit-query 0.4.2
File Size Uploaded Provenance Actions
scikit_query-0.4.2.tar.gz 26.3 kB Without provenance Details for scikit_query-0.4.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for scikit-query 0.4.2
File Interpreter ABI Platform Actions
scikit_query-0.4.2-py3-none-any.whl Python 3 none any Details for scikit_query-0.4.2-py3-none-any.whl

Total release size: 63.7 kB

Release files / scikit_query-0.4.2.tar.gz

Download URL scikit_query-0.4.2.tar.gz
Size 26.3 kB
Tags Source
SHA-256 checksum
How to use checksums
bfe3a6a3ed73fa3f8d332fc037e4fb13c5990b707ddd27e7ea1594769396b749
BLAKE2b-256 checksum
How to use checksums
99898c7bf5588c29bdf8193f75f58c9637bee3d9a1237c62fd3355455ee07d7c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.9.22

Release files / scikit_query-0.4.2-py3-none-any.whl

Download URL scikit_query-0.4.2-py3-none-any.whl
Size 37.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8d35053ab36574346437c2b3bdc6098ba805a25c64034c6ee3739e5b116a9d54
BLAKE2b-256 checksum
How to use checksums
e62d2c576300b2f9b461cb492c67d06c2a0ac9b2403edee7a59b737b1a506e7f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.9.22

Security for scikit-query 0.4.2

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.

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