Metadata-Version: 2.4
Name: deltric
Version: 0.3.0
Summary: Delaunay Triangulation Clustering: density-robust clustering with built-in outlier detection
Home-page: https://github.com/TomasJavurek/deltric
Author: TomasJavurek
Keywords: clustering outlier-detection delaunay-triangulation unsupervised-learning hdbscan-alternative
Classifier: Intended Audience :: Science/Research
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Requires-Python: >=3.8
Description-Content-Type: text/markdown
Requires-Dist: numpy>=1.20
Requires-Dist: scikit-learn>=1.0
Requires-Dist: scipy>=1.7
Requires-Dist: networkx>=2.6
Requires-Dist: umap-learn>=0.5
Requires-Dist: statsmodels>=0.13
Dynamic: author
Dynamic: classifier
Dynamic: description
Dynamic: description-content-type
Dynamic: home-page
Dynamic: keywords
Dynamic: requires-dist
Dynamic: requires-python
Dynamic: summary

# DelTriC - Delaunay Triangulation Clustering

**Density-robust clustering with built-in outlier detection.**

DelTriC is a clustering algorithm based on Delaunay triangulation that excels at
simultaneously finding clusters of arbitrary shape and detecting outliers.

## Key Features

- **No need to specify k** - automatically determines the number of clusters
- **Arbitrary cluster shapes** - not limited to spherical clusters
- **Built-in outlier detection** - identifies anomalies as a first-class output
- **Auto-param mode** - sensible defaults computed from your data
- **scikit-learn compatible** - fit(), fit_predict(), get_params(), set_params()

## Installation

```bash
pip install deltric
```

## Quick Start

```python
from deltric import DelTriC

model = DelTriC()
labels = model.fit_predict(X)

# labels == -1  => outlier
# labels >=  0  => cluster assignment
```

## How It Works

1. **Project** high-dimensional data to 2D using UMAP or PCA
2. **Triangulate** via Delaunay - every point connected to its natural neighbors
3. **Prune** edges longer than a statistically-thresholded length
4. **Extract clusters** as connected components of the remaining graph
5. **Detect outliers** - small connected components and isolated points

## API

```python
DelTriC(
    prune_param="auto",
    merge_param="auto",
    min_cluster_size=10,
    dim_reduction="auto",
    back_proj=True,
    anomaly_sensitivity="auto",
    prune_mode="neighbor_bridge",
    prune_regime="auto",
    projected_hard_limit=True,
    random_state=42,
)
```
