6 releases
0.9.3 | Oct 25, 2022 |
---|---|
0.9.2 | Oct 25, 2022 |
0.8.0 | Jun 7, 2022 |
0.7.0 | Jun 3, 2022 |
#2044 in Algorithms
48 downloads per month
Used in s2gpp
49KB
1K
SLoC
Install as Python Package
0. Minimum Requirements
rustc 1.54.0
Python 3.7
1. Create Python Environment
python3 -m venv .venv
2. Install MeanShift-rs
make install
or
pip install -r requirements.txt
bash ./tasks.sh release-install
or
pip install meanshift-rs
Usage
Rust
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!");
}
Python
from meanshift_rs import MeanShift
# ... load data
ms = MeanShift()
ms.fit(data)
print(ms.cluster_centers)
print(ms.labels)
Dependencies
~6–15MB
~189K SLoC