Skip to main content

PyPI version License: MIT Python 3.7+

ANDClust

This package implementsthe ANDClust (Adaptive Neighborhood Distance-Based Clustering Algorithm to Cluster Varying Density and/or Neck-Typed Datasets) algorithm.

Installation

pip install andclust

Usage

from andclust import ANDClust
from sklearn.datasets import load_iris
from sklearn.preprocessing import MinMaxScaler
from sklearn.metrics.cluster import adjusted_rand_score

data=load_iris()
X,y=data['data'],data['target']

scaler = MinMaxScaler()
scaler.fit(X)
X = scaler.transform(X)

model = ANDClust(N=2,k=14,eps=0.113) # If you want to change kernel and band_with use model = ANDClust(N=2,k=14,eps=0.113,kernel='gaussian',b_width=0.025) default values for optional parameter krnl='gaussian', b_width=0.5 options for kernel are{“gaussian”, “tophat”, “epanechnikov”, “exponential”, “linear”, “cosine”}
labels = model.fit_predict(X)

ARI=adjusted_rand_score(labels,y)
print("ARI=", ARI)

Features

- Detects arbitrary-shaped clusters due to its density-based core structure.

- Handles varying density both between clusters and within the same cluster via a flexible neighborhood–distance mechanism.

- Robust against outliers and noisy samples.

- Capable of clustering high-dimensional datasets.

- Performs well on imbalanced datasets.

- Achieves high clustering quality across multiple evaluation metrics.

- Effectively identifies neck-type (bottleneck-shaped) clusters.

Citation

If you use this algorithm in research, please cite the corresponding paper.

Şenol, A. (2024). ANDClust: An Adaptive Neighborhood Distance-Based Clustering Algorithm to Cluster Varying Density and/or Neck-Typed Datasets. Advanced Theory and Simulations, 7(4), 2301113.

BibTeX

@article{csenol2024andclust,
  title={ANDClust: An Adaptive Neighborhood Distance-Based Clustering Algorithm to Cluster Varying Density and/or Neck-Typed Datasets},
  author={{\c{S}}enol, Ali},
  journal={Advanced Theory and Simulations},
  volume={7},
  number={4},
  pages={2301113},
  year={2024},
  publisher={Wiley Online Library}
}

LICENSE **

MIT License

Copyright (c) 2025 Ali Şenol

Permission is hereby granted, free of charge, to any person obtaining a copy
...

Metadata

Release files for andclust 1.0.5

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

Source distribution (sdist)

Source distribution for andclust 1.0.5
File Size Uploaded
andclust-1.0.5.tar.gz 6.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for andclust 1.0.5
File Interpreter ABI Platform
andclust-1.0.5-py3-none-any.whl Python 3 none any Details

Total release size: 13.7 kB

Release files / andclust-1.0.5.tar.gz

Download URL andclust-1.0.5.tar.gz
Size 6.5 kB
Tags Source
SHA-256 checksum
How to use checksums
b84437af8e51fd80efb5c416949fe703804d881f766469acd559214c3d908f92
BLAKE2b-256 checksum
How to use checksums
2ff2846917efab4b21d8b79d9f1aae6944ba5b74ee77bfdb7fe14b8d3520e99f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.5

Release files / andclust-1.0.5-py3-none-any.whl

Download URL andclust-1.0.5-py3-none-any.whl
Size 7.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
370dafc69de72a6d038f776d4f751dda10b792041fc79b6dc69bfe297ccb6c45
BLAKE2b-256 checksum
How to use checksums
e270b48ab20001540457cdb2061666f2d0fa9519f102dd638810a70c5ed60289
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.5

Release history Release notifications | RSS feed

This release

1.0.5 This release

2 release files

1.0.4

2 release files

1.0.3

2 release files

1.0.2

2 release files

1.0.1

2 release files

1.0.0

2 release files

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