Skip to main content

ANDClust: Adaptive Neighborhood Density-Based Clustering Algorithm

Project description

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
...

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

andclust-1.0.1.tar.gz (5.4 kB view details)

Uploaded Source

Built Distribution

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

andclust-1.0.1-py3-none-any.whl (5.5 kB view details)

Uploaded Python 3

File details

Details for the file andclust-1.0.1.tar.gz.

File metadata

  • Download URL: andclust-1.0.1.tar.gz
  • Upload date:
  • Size: 5.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.5

File hashes

Hashes for andclust-1.0.1.tar.gz
Algorithm Hash digest
SHA256 cddad54148bee6f2d8f4b50fe4049eeeabcaeb55ff2ef5ceac9021b3296788af
MD5 72e23aede29d40cb749bd2567fe221a7
BLAKE2b-256 f588c9b8ba6c4014b85049e13c5c9618c353c23d46ff3a11e139642d591acc9e

See more details on using hashes here.

File details

Details for the file andclust-1.0.1-py3-none-any.whl.

File metadata

  • Download URL: andclust-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 5.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.5

File hashes

Hashes for andclust-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 8f61feaaab17df20d9e5d2df4ab074e9c9238351fc3b3be3fbd1d66cf78f46b2
MD5 f6c4130ab23a7ecfc8ea4e49a1dce3ba
BLAKE2b-256 1c1aeed90645fd6d03b08ba5abfe3d6dd2c52168b480215d6a139a06de4bc36a

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