Skip to content

Fast hierarchical agglomerative clustering in Rust.

License

Notifications You must be signed in to change notification settings

SubconsciousCompute/kodama

This branch is 3 commits ahead of, 11 commits behind diffeo/kodama:master.

Folders and files

NameName
Last commit message
Last commit date

Latest commit

c0dcc35 · Dec 21, 2022

History

42 Commits
Jul 21, 2020
Jul 21, 2020
Aug 7, 2017
Aug 7, 2017
Jun 1, 2018
Jul 21, 2020
Dec 20, 2022
Dec 21, 2022
Dec 20, 2022
Oct 12, 2021
Dec 21, 2022
Aug 7, 2017
Dec 21, 2022
Jul 21, 2020

Repository files navigation

kodama

Changes made over the original crate:

  • Update Rust edition from 2018 to 2021
  • Merge ag/updates branch into master
  • Heavier use of #[inline]
  • Use codegen = 1, lto = true and opt-level = 3 in cargo.toml for release version
  • Use panic = abort (plays nicely with inlining and making more code fit in instructions cache)
  • A few other small changes

This crate provides a fast implementation of agglomerative hierarchical clustering.

Linux build status

This library is released under the MIT license.

The ideas and implementation in this crate are heavily based on the work of Daniel Müllner, and in particular, his 2011 paper, Modern hierarchical, agglomerative clustering algorithms. Parts of the implementation have also been inspired by his C++ library, fastcluster. Müllner's work, in turn, is based on the hierarchical clustering facilities provided by MATLAB and SciPy.

The runtime performance of this library is on par with Müllner's fastcluster implementation.

For a more detailed example of how to use hierarchical clustering, see the example in the API documentation.

Documentation

https://docs.rs/kodama

Usage

Add this to your Cargo.toml:

[dependencies]
kodama = { git = "https://github.com/SubconsciousCompute/kodama" }

and this to your crate root:

use kodama;

C API and Go bindings

This repository includes kodama-capi, which provides a C interface to hierarchical clustering.

This repository also includes Go FFI bindings via cgo to the aforementioned C API. Documentation for the Go library can be found at godoc.org/github.com/diffeo/kodama/go-kodama.

About

Fast hierarchical agglomerative clustering in Rust.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Rust 74.8%
  • C 10.1%
  • Go 9.1%
  • Python 5.7%
  • Shell 0.3%