Metadata-Version: 2.4
Name: clustering-nassir
Version: 0.1.0
Summary: A semi-supervised clustering method using anomaly detection
Home-page: https://github.com/m-nassir/clustering
Author: Nassir Mohammad
Author-email: drnassirmohammad@gmail.com
License: MIT
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: numpy
Requires-Dist: perception_nassir
Dynamic: author
Dynamic: author-email
Dynamic: classifier
Dynamic: description
Dynamic: description-content-type
Dynamic: home-page
Dynamic: license
Dynamic: license-file
Dynamic: requires-dist
Dynamic: requires-python
Dynamic: summary

# 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:

```bash
pip install clustering_nassir
```

## Usage

```bash
pip install clustering_nassir
from clustering_nassir import NovelClustering
```

