Skip to content

About

A clustering omnibenchmark

Topics

Resources

Stars

2 stars

Watchers

3 watching

Forks

Repository files navigation

A clustering example for omnibenchmark

How to run

  1. Install omnibenchmark using our tutorial
  2. Clone the benchmark plan / this repository with git clone --recurse-submodules git@github.com:omnibenchmark/clustering_example.git. The modules are git submodules under modules/, each pinned to a commit (git submodule status); in an existing clone, git submodule update --init
  3. Move to the cloned repository cd clustering_example
  4. Run locally, somewhat in parallel ob run CLUSTERING.YAML --dirty --cores 6 (--dirty because the plans name the modules by local path). Choose Clustering.yml plan based on whether running it with conda, easybuild, apptainer, etc. More details about the available backends.

The plans are written for omnibenchmark api 0.8.0.

A quick check on two datasets

slice.obfilter.yaml keeps two small datasets (fcps/atom, fcps/chainlink) and every method and metric:

ob run Clustering_conda.yml --dirty --filter slice.obfilter.yaml --cores 6

Reports

  • metrics (every plan) gathers the clusterings of a dataset and writes one summary.tsv for it: every metric of the plan's metrics list, with the dataset, method and parameters of each score.
  • report (conda plan) renders reports/report.Rmd over those tables into out/report/report.html.
  • reports/across_backends.Rmd compares several runs (backends, seeds, repeats).
  • scripts/verify_zenodo.py OUT checks the scores of a run against the runs archived with the paper (https://doi.org/10.5281/zenodo.18598405). The archive used seeds 20, 54 and 85: make run_conda SEED=20. Run with -k --timeout 2h, as the archive was, and compare with the conda run (the default; the docker images match it score for score). Exit 1 when a score differs or is missing without a recorded failure (an empty scores file in the archive, a failure.json in OUT): jobs near the 2 h limit finish in one run and not the other, so those are listed, not fatal. It is not part of a run: make run_conda run_docker run_envmodules across_backends.

Disclaimer

This does not work in arm64.

Clustbench attribution

by Marek Gagolewski, modified by Izaskun Mallona (some edits to the plan(s) by Ben Carrillo, Mark Robinson)

Data disclaimer

Some datasets are commented out to speed up calculations.

From Are cluster validity measures (in) valid?:

The original benchmark battery consists of 79 data instances, however 16 datasets are accompanied by labels that yield ; they were omitted for their computation would be too lengthy (namely: mnist/digits, mnist/fashion, other/chameleon_t7_10k, other/chameleon_t8_8k, sipu/a1, sipu/a2, sipu/a3, sipu/birch1, sipu/birch2, sipu/d31, sipu/s1, sipu/s2, sipu/s3, sipu/s4, sipu/worms_2, sipu/worms_64). Also uci/glass has been removed as one of its 25-near-neighbour graph’s connected components was too small for the NN-based methods to succeed. This leaves us with 62 datasets in total.

A yaml such as 0a88c91 with 30 cores should run half of the stuff in ~4 h and reach 97% completion in ~8h.

Summary

Software backends

In envs: conda, Docker (built locally), easybuild (lmod modules)

Warnings

Note that we try to run clusterings specifying the true number of clusters +- 2. But sometimes the true number is k=3. Then we do k=2, k=2, k=3, k=5, k=6 filling with k=2s as needed, and recomputing the same values multiple times (so runtimes are comparable across datasets, regardless of their true number of clusters).

Also, we have modules by Daniel Incicau that are not fully incorporated into Gagolewski's flow.

About

A clustering omnibenchmark

Topics

Resources

Stars

2 stars

Watchers

3 watching

Forks

Releases

Packages

Used by

Contributors

Languages