Efficient and robust topology-based clustering.
Graphical abstract of the LTC algorithm (JM Zollner, CC BY-SA 4.0).This is a minimal example. See installation for how to install.
from ltcpy import LifetimeClustering
data = ... # data
eps = ... # fixed-radius
ltc = LifetimeClustering(eps) # initialize
ltc.fit(data) # cluster
labels = ltc.labels_ # get labelsTo use directly in Rust, add it with cargo add ltc-rs as a dependency to your Cargo.toml.
let x: Vec<Vec<f32>> = ...; // data
let eps: f32 = ...; // fixed-radius
let (labels, lifetime) = ltc_rs::fit(&x,eps); // clusterInstalling with with pip from PyPI with
pip install ltcpyAlternatively, build from source with Rust and Maturin. To build and install the ltcpy package locally, run:
maturin develop -m ltc-py/Cargo.toml --release| Path | Content |
|---|---|
./assets |
Example data |
./ltc-py |
Python bindings |
./ltc-rs |
Rust implementation |
./scripts |
Notebook with examples, Python implementation |
@article{ltc,
author = {Zollner, Johann M. and Teuscher, Balthasar and Mansour, Wejdene and Werner, Martin},
title = {Efficient and Robust Topology-Based Clustering},
}This work was supported by the German Federal Ministry of Research, Technology and Space under grant number 16DKWN134.
The project is licensed under the Apache-2.0 license or opensource.org/licenses/Apache-2.0.
