Package for IOH Clustering problems
Project description
IOHClustering
IOHClustering provides an interface for clustering problems, allowing users to map a dataset and a specified number of clusters to the IOHprofiler problem format. This enables seamless integration with the IOHprofiler framework for further analysis and performance evaluation.
As part of the IOHprofiler framework, IOHClustering is under active development. Some features may still be evolving, with potential updates to functionality and interfaces.
Features
- Transform datasets into clustering problems compatible with the IOHprofiler framework.
- Real-world datasets for clustering, such as:
- Iris dataset
- Wine dataset
- KC1 dataset
- Glass dataset
Installation
The minimum supported Python version is 3.10. Install IOHClustering via pip and git:
pip install iohclustering
Basic Usage
Examples and Tutorials
Below are several examples demonstrating how to use IOHClustering for various clustering tasks. These examples cover basic usage, working with benchmark problems, solving custom datasets, and defining custom evaluation functions.
Example: Clustering a Dataset
The following example shows how to get a benchmark clustering problem (by name or ID) the IOHClustering framework:
from iohclustering import get_problem, download_benchmark_datasets
# Get benchmark problem by name (e.g., "iris_pca") with k=2 clusters
clustering_problem, retransform = get_problem(fid="iris_pca", k=2)
# Alternatively, get benchmark problem by its ID (e.g., ID=5) with k=2 clusters
clustering_problem, retransform = get_problem(fid=5, k=2)
# Print metadata of the clustering problem
print(clustering_problem.meta_data)
# Set up a logger to store results in the specified directory
logger = ioh.logger.Analyzer(
root=os.getcwd(), # Current working directory
folder_name="AttachedLogger", # Folder to store logs
algorithm_name="None", # Name of the algorithm (can be customized)
)
# Attach the logger to the created clustering problem
clustering_problem.attach_logger(logger)
Example: Listing Available Benchmark Problems
You can retrieve a list of all benchmark problems available in IOHClustering:
from iohclustering import load_problems
problems = load_problems()
for problem in problems.keys():
print(problem)
Tutorials
Explore the following Jupyter notebooks for step-by-step tutorials on using IOHClustering:
- Custom Dataset and Random Search Tutorial: Learn how to define clustering problems with your own datasets and explore solutions using random search.
- Custom Metric and Random Search Tutorial: Understand how to define custom clustering metrics and solve clustering problems with random search.
License
This project is licensed under a standard BSD-3 clause License. See the LICENSE file for details.
Acknowledgments
This work has been estabilished as a collaboration between:
- Diederick Vermetten
- Catalin-Viorel Dinu
- Marcus Gallagher
Cite Us
Citation information coming soon!
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file iohclustering-0.0.2.tar.gz.
File metadata
- Download URL: iohclustering-0.0.2.tar.gz
- Upload date:
- Size: 70.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
33cbba54015ed4d53c3164bec26f7d5f4f55ccdefcc5ff7fa4f1f975b5ebed31
|
|
| MD5 |
6319a8cefd197ec889bce7f2a8630c2c
|
|
| BLAKE2b-256 |
ef19252b4e0b93611958efd5fe27aef61371fe5ecee418a4f64a3a12764e5c88
|
Provenance
The following attestation bundles were made for iohclustering-0.0.2.tar.gz:
Publisher:
python-publish.yml on IOHprofiler/IOHClustering
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
iohclustering-0.0.2.tar.gz -
Subject digest:
33cbba54015ed4d53c3164bec26f7d5f4f55ccdefcc5ff7fa4f1f975b5ebed31 - Sigstore transparency entry: 195425051
- Sigstore integration time:
-
Permalink:
IOHprofiler/IOHClustering@b919a3a5c33474eb54c8330c7713641ac998adc7 -
Branch / Tag:
refs/tags/v0.0.2 - Owner: https://github.com/IOHprofiler
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@b919a3a5c33474eb54c8330c7713641ac998adc7 -
Trigger Event:
release
-
Statement type:
File details
Details for the file iohclustering-0.0.2-py3-none-any.whl.
File metadata
- Download URL: iohclustering-0.0.2-py3-none-any.whl
- Upload date:
- Size: 70.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4b8fcd7da164bcc685ba87954f374e66d16460254b3e9e7217b3a40ba03c081d
|
|
| MD5 |
224f31bcee9338b831f16b51c8e59e80
|
|
| BLAKE2b-256 |
88f825ec89edcecd857a7e0289a7da9df2ff1bc146d6f22d5f139c5c4d5c223d
|
Provenance
The following attestation bundles were made for iohclustering-0.0.2-py3-none-any.whl:
Publisher:
python-publish.yml on IOHprofiler/IOHClustering
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
iohclustering-0.0.2-py3-none-any.whl -
Subject digest:
4b8fcd7da164bcc685ba87954f374e66d16460254b3e9e7217b3a40ba03c081d - Sigstore transparency entry: 195425052
- Sigstore integration time:
-
Permalink:
IOHprofiler/IOHClustering@b919a3a5c33474eb54c8330c7713641ac998adc7 -
Branch / Tag:
refs/tags/v0.0.2 - Owner: https://github.com/IOHprofiler
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@b919a3a5c33474eb54c8330c7713641ac998adc7 -
Trigger Event:
release
-
Statement type: