Clustered Learning of Approximate Manifolds
Project description
CLAM: Clustered Learning of Approximate Manifolds (v0.12.1)
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.
Installation
> python3 -m pip install "abd_clam==0.12.1"
Usage
from abd_clam.search import CAKES
from abd_clam.utils import synthetic_data
# Get the data.
data, _ = synthetic_data.bullseye()
# data is a numpy.ndarray in this case but it could just as easily be a numpy.memmap if your data do fit in RAM.
# We used numpy memmaps for the research, though they impose file-IO costs.
model = CAKES(data, 'euclidean')
# The Search class provides the functionality described in our [CHESS paper](https://arxiv.org/abs/1908.08551).
model.build(max_depth=50)
# Build the search tree to depth of 50.
# This method can be called again with a higher depth, if needed.
query, radius = data[0], 0.5
rnn_results = model.rnn_search(query, radius)
# This is how we perform ranged nearest neighbors search with radius 0.5 around the query.
# The results are returned as a dictionary whose keys are indices into the data array and whose values are the distance to the query.
knn_results = model.knn_search(query, 10)
# This is how we perform k-nearest neighbors search for the 10 nearest neighbors of query.
# TODO: Provide snippets for using CHAODA
License
Citation
TODO
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
abd_clam-0.12.1.tar.gz
(34.7 kB
view hashes)
Built Distribution
abd_clam-0.12.1-py3-none-any.whl
(42.8 kB
view hashes)
Close
Hashes for abd_clam-0.12.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f01f10288f65f8fe9f7d95b4e64d81a9723590fc228b2caa4a409ec15c9bcda8 |
|
MD5 | e82c8a8f340940284d0b4364d45f7806 |
|
BLAKE2b-256 | b5a9db47f3b6ca4e62da50c78dc6ddcc55563bb71e9331fe359e66caf6ec1485 |