Crates.io | meanshift-rs |
lib.rs | meanshift-rs |
version | 0.9.3 |
source | src |
created_at | 2022-06-03 14:59:54.551798 |
updated_at | 2022-10-25 16:31:47.224925 |
description | Rust version of the MeanShift clustering algorithm that does not need a predefined number of clusters. |
homepage | |
repository | https://github.com/wenig/meanshift-rs |
max_upload_size | |
id | 599298 |
size | 126,687 |
rustc 1.54.0
Python 3.7
python3 -m venv .venv
make install
or
pip install -r requirements.txt
bash ./tasks.sh release-install
or
pip install meanshift-rs
use meanshift_rs::{MeanShiftActor, Parameters};
fn example_fn(dataset: Array2<f64>) {
let parameters = Parameters::default();
let mut mean_shift = MeanShiftActor::init(parameters);
let (centers, labels) = mean_shift.fit(dataset)
.expect("No MeanShiftResult was returned!");
}
from meanshift_rs import MeanShift
# ... load data
ms = MeanShift()
ms.fit(data)
print(ms.cluster_centers)
print(ms.labels)