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 NovelClustering

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.0.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.0-py3-none-any.whl (7.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: clustering_nassir-0.1.0.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.0.tar.gz
Algorithm Hash digest
SHA256 d4caec939641480e70cf1ca2e270bf50b96b987db280fef5d825cc244c3e6f91
MD5 9069b87e8c87473cc2eaa2129c458cf8
BLAKE2b-256 fc20956a97d067f13f55089bd1d85c93a4dfe98cc7cc61a808e36169a98cea04

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for clustering_nassir-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ccde631c4eaf269aa94e9d5922da9deff967cf5e0db4fb4c5fe5a5c1b2af9178
MD5 ffd100fd9cf9919ce286843716d3e4bb
BLAKE2b-256 d313dbc7e5ca3a5d752a1d1e510ac29d92df41f006645d327818b5cb9fe187eb

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