Skip to content

tum-bgd/ltc

Repository files navigation

PyPI - Version Crates.io Version GitHub Actions Workflow Status

Lifetime Clustering (LTC)

Efficient and robust topology-based clustering.

Graphical abstract of the LTC algorithm (JM Zollner, CC BY-SA 4.0).

Example

This is a minimal example. See installation for how to install.

Python

from ltcpy import LifetimeClustering

data = ... # data
eps = ... # fixed-radius

ltc = LifetimeClustering(eps) # initialize
ltc.fit(data) # cluster

labels = ltc.labels_ # get labels

Rust

To 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); // cluster

Installation

Installing with with pip from PyPI with

pip install ltcpy

Alternatively, build from source with Rust and Maturin. To build and install the ltcpy package locally, run:

maturin develop -m ltc-py/Cargo.toml --release

Layout

Path Content
./assets Example data
./ltc-py Python bindings
./ltc-rs Rust implementation
./scripts Notebook with examples, Python implementation

Reference

@article{ltc,
    author    = {Zollner, Johann M. and Teuscher, Balthasar and Mansour, Wejdene and Werner, Martin},
    title     = {Efficient and Robust Topology-Based Clustering},
}

Funding

This work was supported by the German Federal Ministry of Research, Technology and Space under grant number 16DKWN134.

License

The project is licensed under the Apache-2.0 license or opensource.org/licenses/Apache-2.0.

About

Lifetime Clustering (LTC)

Resources

License

Stars

Watchers

Forks

Contributors 2

  •  
  •