Skip to main content

A semi-supervised clustering method using anomaly detection

Project description

A Novel Semi-Supervised Clustering Method

This project implements a semi-supervised clustering algorithm, based on the method described in the following publication: https://arxiv.org/abs/2306.06974

The algorithm takes as input a matrix of numerical features, where each row represents an example and each column a feature. An additional column must contain partial labels (seeds), which are externally provided. Labels must be integers >= -1, with -1 reserved for unlabelled examples.

As a rule of thumb, it is recommended to provide 10-30 labelled examples per known class to ensure effective clustering.

At its core, the algorithm uses the Perception anomaly detection algorithm. Starting from the initial labelled seeds, it iteratively adds or ejects points from each cluster based on their consistency with the group. This process continues until the clusters stabilise or a maximum number of iterations is reached.

See the notebooks folder for getting started guides containing examples of using the method, and its performance against other popular clustering methods.

Key features:

  • Supports both one-dimensional and multi-dimensional numerical data.
  • Assigns a cluster label to every input example.
  • Uses the label -1 to indicate anomalous examples.
  • These anomalous examples can be reviewed in follow-up analysis, allowing users to refine labels and re-run clustering in iterative cycles.

Installation

To install the solution via pip, you can use the following command:

pip install clustering_nassir

Usage

pip install clustering_nassir
from clustering_nassir import SemiSupervisedClusterer

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

clustering_nassir-0.1.1.tar.gz (8.1 kB view details)

Uploaded Source

Built Distribution

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

clustering_nassir-0.1.1-py3-none-any.whl (7.1 kB view details)

Uploaded Python 3

File details

Details for the file clustering_nassir-0.1.1.tar.gz.

File metadata

  • Download URL: clustering_nassir-0.1.1.tar.gz
  • Upload date:
  • Size: 8.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.7

File hashes

Hashes for clustering_nassir-0.1.1.tar.gz
Algorithm Hash digest
SHA256 0f0e7cb39db36e8b787ddb744a125b011451714bab82f9210142a410d4ae135f
MD5 293908f62e30627d4ac3f5af19c13931
BLAKE2b-256 fe68cfce77dde632378bd7fb44656eb22b783303ee72e54e4613909041cf5071

See more details on using hashes here.

File details

Details for the file clustering_nassir-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for clustering_nassir-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 9bd1839e18fac81766e89cf03632a8c4f3c1cf0f30fa8be50f406101faae9194
MD5 747be5612b73e1bd85f3f6802b6f0b29
BLAKE2b-256 f9164bc88fb969a4444fac6bb549c3afb5a0663107b6bd2a232695290f3b0c94

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