CLAM: Clustered Learning of Approximate Manifolds (v0.17.0)
CLAM is a Rust/Python library for learning approximate manifolds from data. It is designed to be fast, memory-efficient, easy to use, and scalable for big data applications.
CLAM provides utilities for fast search (CAKES) and anomaly detection (CHAODA).
As of writing this document, the project is still in a pre-1.0 state. This means that the API is not yet stable and breaking changes may occur frequently.
Usage
CLAM is a library crate so you can add it to your crate using cargo add abd_clam@0.17.0.
Here is a simple example of how to use CLAM to perform nearest neighbors search:
use random_data;
use ;
// Get the data and queries. We will generate some random data for this demo.
let seed = 42;
let = ;
let = ;
let data = random_f32;
let data = data.iter.map.;
let dataset = new;
let criteria = new.with_min_cardinality;
let model = CAKESnew;
// The CAKES struct provides the functionality described in the CHESS paper.
let = ;
let rnn_results: = model.rnn_search;
assert!;
// This is how we perform ranged nearest neighbors search with radius 0.05
// around the query.
let knn_results: = model.knn_search;
assert!;
// This is how we perform k-nearest neighbors search for the 10 nearest
// neighbors of query.
// Both results are a Vec of 2-tuples where each tuple is the index and
// distance to points in the data.
License
- MIT
References
Citation
TODO