Skip to main content

A Clustering under radius constraints algorithm using minimum dominating sets

Project description

Radius Clustering

Radius clustering is a Python package that implements clustering under radius constraint based on the Minimum Dominating Set (MDS) problem. This problem is NP-Hard but has been studied in the literature and proven to be linked to the clustering under radius constraint problem (see references for more details).

Features

  • Implements both exact and approximate MDS-based clustering algorithms
  • Compatible with scikit-learn's API for clustering algorithms
  • Supports radius-constrained clustering
  • Provides options for exact and approximate solutions

Installation

You can install Radius Clustering using pip:

pip install radius-clustering

Note: This package is not yet available on PyPI. You may need to install it from the source.

Usage

Here's a basic example of how to use Radius Clustering:

import numpy as np
from radius_clustering import RadiusClustering

# Example usage
X = np.random.rand(100, 2)  # Generate random data

# Create an instance of MdsClustering
rad_clustering = RadiusClustering(manner="approx", threshold=0.5)

# Fit the model to the data
rad_clustering.fit(X)

# Get cluster labels
labels = rad_clustering.labels_

print(labels)

Documentation

To build the documentation, you can run the following command, assuming you have Sphinx installed:

cd docs
make html

Then you can open the index.html file in the build directory to view the full documentation.

More information

For more information please refer to the official documentation.

If you want insights on how the algorithm works, please refer to the presentation.

If you want to know more about the experiments conducted with the package, please refer to the experiments.

Contributing

Contributions to MDS Clustering are welcome! Please feel free to submit a Pull Request.

License

This project is licensed under the GNU General Public License v3.0 - see the LICENSE file for details.

Acknowledgments

MDS Algorithms

The two MDS algorithms implemented are forked and modified (or rewritten) from the following authors:

  • Alejandra Casado for the minimum dominating set heuristic code [1]. We rewrote the code in C++ to adapt to the need of python interfacing.
  • Hua Jiang for the minimum dominating set exact algorithm code [2]. The code has been adapted to the need of python interfacing.

Funders

The Radius Clustering work has been funded by:

Contributors

References

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

radius_clustering-1.0.0.tar.gz (194.3 kB view details)

Uploaded Source

Built Distributions

radius_clustering-1.0.0-cp313-cp313-manylinux_2_24_x86_64.whl (890.4 kB view details)

Uploaded CPython 3.13 manylinux: glibc 2.24+ x86-64

radius_clustering-1.0.0-cp313-cp313-manylinux_2_17_x86_64.whl (810.1 kB view details)

Uploaded CPython 3.13 manylinux: glibc 2.17+ x86-64

radius_clustering-1.0.0-cp312-cp312-manylinux_2_24_x86_64.whl (903.2 kB view details)

Uploaded CPython 3.12 manylinux: glibc 2.24+ x86-64

radius_clustering-1.0.0-cp312-cp312-manylinux_2_17_x86_64.whl (822.7 kB view details)

Uploaded CPython 3.12 manylinux: glibc 2.17+ x86-64

radius_clustering-1.0.0-cp312-cp312-macosx_10_9_universal2.whl (341.4 kB view details)

Uploaded CPython 3.12 macOS 10.9+ universal2 (ARM64, x86-64)

radius_clustering-1.0.0-cp311-cp311-manylinux_2_24_x86_64.whl (890.0 kB view details)

Uploaded CPython 3.11 manylinux: glibc 2.24+ x86-64

radius_clustering-1.0.0-cp311-cp311-manylinux_2_17_x86_64.whl (809.6 kB view details)

Uploaded CPython 3.11 manylinux: glibc 2.17+ x86-64

radius_clustering-1.0.0-cp310-cp310-manylinux_2_24_x86_64.whl (874.3 kB view details)

Uploaded CPython 3.10 manylinux: glibc 2.24+ x86-64

radius_clustering-1.0.0-cp310-cp310-manylinux_2_17_x86_64.whl (794.1 kB view details)

Uploaded CPython 3.10 manylinux: glibc 2.17+ x86-64

radius_clustering-1.0.0-cp39-cp39-manylinux_2_24_x86_64.whl (873.8 kB view details)

Uploaded CPython 3.9 manylinux: glibc 2.24+ x86-64

radius_clustering-1.0.0-cp39-cp39-manylinux_2_17_x86_64.whl (793.8 kB view details)

Uploaded CPython 3.9 manylinux: glibc 2.17+ x86-64

File details

Details for the file radius_clustering-1.0.0.tar.gz.

File metadata

  • Download URL: radius_clustering-1.0.0.tar.gz
  • Upload date:
  • Size: 194.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.11.2

File hashes

Hashes for radius_clustering-1.0.0.tar.gz
Algorithm Hash digest
SHA256 e76639faece98bd7e32955cef18be3c0cbbb2ed3c65f1f83aab7c3df7506591b
MD5 a01acf96c70cd3ec1fe5f8c1cee9cb95
BLAKE2b-256 ab03483b05c37084c8bcfa244312c55c27e8a9c3ef66ed184c63a99d1494269c

See more details on using hashes here.

File details

Details for the file radius_clustering-1.0.0-cp313-cp313-manylinux_2_24_x86_64.whl.

File metadata

File hashes

Hashes for radius_clustering-1.0.0-cp313-cp313-manylinux_2_24_x86_64.whl
Algorithm Hash digest
SHA256 1e4454481bb4b0b06edac909bc22912e941ee0bf8e7be69edfbbf3d23013c2d4
MD5 317348cc7aca30d6ad48584e73ada4d8
BLAKE2b-256 8752ce9fd830531347329b034f5b6968d4f3855f89ac60d09887b99ba7facb2a

See more details on using hashes here.

File details

Details for the file radius_clustering-1.0.0-cp313-cp313-manylinux_2_17_x86_64.whl.

File metadata

File hashes

Hashes for radius_clustering-1.0.0-cp313-cp313-manylinux_2_17_x86_64.whl
Algorithm Hash digest
SHA256 dde6fb353693ad95fe4292ffb593af53b155c662cb017df43cfee8e13be0f783
MD5 6ab360924588315a1adfbc3f0932feda
BLAKE2b-256 c48f2272e89ea49d6ab99ab5ff2807de0cc18ff15f25d6c03e590a3b0c27c360

See more details on using hashes here.

File details

Details for the file radius_clustering-1.0.0-cp312-cp312-manylinux_2_24_x86_64.whl.

File metadata

File hashes

Hashes for radius_clustering-1.0.0-cp312-cp312-manylinux_2_24_x86_64.whl
Algorithm Hash digest
SHA256 48f1389df858aa32c683bd37de1131112b64a8d725506341a814d8eabe66f3bd
MD5 032f16990626b1c8e106523d010266a3
BLAKE2b-256 e7903025fc67cb4ef87dd098ee30f91e6934864b319aca564fb587bae8c8b09c

See more details on using hashes here.

File details

Details for the file radius_clustering-1.0.0-cp312-cp312-manylinux_2_17_x86_64.whl.

File metadata

File hashes

Hashes for radius_clustering-1.0.0-cp312-cp312-manylinux_2_17_x86_64.whl
Algorithm Hash digest
SHA256 87dbb420a81d763890ed150d5ef94aa0ee7f7146dc83bf9326c1a96898d057b2
MD5 e67f1455c63618f59a8d42fa278450b1
BLAKE2b-256 9393aca8d70ba6fd30f98cefd0d18e88839c2562560f3d29546ab39847efc2ce

See more details on using hashes here.

File details

Details for the file radius_clustering-1.0.0-cp312-cp312-macosx_10_9_universal2.whl.

File metadata

File hashes

Hashes for radius_clustering-1.0.0-cp312-cp312-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 32d42a0212d8d5cb7b1245d109601f4b1e55cc91e515d833fead5b1b16788abd
MD5 d81a7ac4a703d5694854a60a6139ac43
BLAKE2b-256 0e9f6ce603b5a2c102a4b7a2071f4628d8b26b1a5aea0b42293140856a81e4fb

See more details on using hashes here.

File details

Details for the file radius_clustering-1.0.0-cp311-cp311-manylinux_2_24_x86_64.whl.

File metadata

File hashes

Hashes for radius_clustering-1.0.0-cp311-cp311-manylinux_2_24_x86_64.whl
Algorithm Hash digest
SHA256 63ac2bd3babfe48b837deaf8e02cb29ffbb68ef8c31cdbe75c1c7aa9631731aa
MD5 a53f425f76d182c36747276fcd0b8557
BLAKE2b-256 bfb35eee880847290664e7c81f857069426da7e7a47e5a107a9d1f90b1b3d5cd

See more details on using hashes here.

File details

Details for the file radius_clustering-1.0.0-cp311-cp311-manylinux_2_17_x86_64.whl.

File metadata

File hashes

Hashes for radius_clustering-1.0.0-cp311-cp311-manylinux_2_17_x86_64.whl
Algorithm Hash digest
SHA256 bb01864e7cc1d850f4479d1d5381582bc54ca3b87cb75508bf7880d42386dacc
MD5 3996977712e507acc6e5f57d2149a834
BLAKE2b-256 bb31b12ea67946003b59bd05c7c08350580682c78c1ed9b2e89f7ff5397fbbae

See more details on using hashes here.

File details

Details for the file radius_clustering-1.0.0-cp310-cp310-manylinux_2_24_x86_64.whl.

File metadata

File hashes

Hashes for radius_clustering-1.0.0-cp310-cp310-manylinux_2_24_x86_64.whl
Algorithm Hash digest
SHA256 bc62fe5786ef365f6f167527932806278ad4bc2c969b1720be6d8ee8a3326fe7
MD5 d145fffa299c3097f81811220d5fa9bd
BLAKE2b-256 8b060964d78984520b12f141d4a463a04cbdddb92b0e6449e8aea421da0cc9a5

See more details on using hashes here.

File details

Details for the file radius_clustering-1.0.0-cp310-cp310-manylinux_2_17_x86_64.whl.

File metadata

File hashes

Hashes for radius_clustering-1.0.0-cp310-cp310-manylinux_2_17_x86_64.whl
Algorithm Hash digest
SHA256 939fdd171a5ceb69ab2612a5061311b81be1b9416dca85e2adb96c289134c17b
MD5 33ae4c0a93fc7acc6175fa7d086033b1
BLAKE2b-256 5f13af138c157fe51aa7631b4d0dddba6a1ad1b19d5b32793256c20c15883e9a

See more details on using hashes here.

File details

Details for the file radius_clustering-1.0.0-cp39-cp39-manylinux_2_24_x86_64.whl.

File metadata

File hashes

Hashes for radius_clustering-1.0.0-cp39-cp39-manylinux_2_24_x86_64.whl
Algorithm Hash digest
SHA256 0cc4ffdfd42e5254dfa4d9dfc2906eff363fa4a401d2bc38682fa4dea8836f73
MD5 be497d68ad8d1c61fc20810c9d8b12fd
BLAKE2b-256 ef9b6933b63ad55f6430e4b0d4d2e8418756b81d3d9687345f8e71bd1ece18a6

See more details on using hashes here.

File details

Details for the file radius_clustering-1.0.0-cp39-cp39-manylinux_2_17_x86_64.whl.

File metadata

File hashes

Hashes for radius_clustering-1.0.0-cp39-cp39-manylinux_2_17_x86_64.whl
Algorithm Hash digest
SHA256 3c9a13348b63873d85f784a3914ff4342b31504f77c04ad7952085c693f4d9ee
MD5 40726dac6769cecfbc556d989e13a01f
BLAKE2b-256 b015183fe95156eaf8123a4d4c4623b5025b8a4f8f93576d2dc22b6e13b2d3e9

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page