Rust version of the MeanShift clustering algorithm that does not need a predefined number of clusters.
Project description
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)
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
Built Distributions
File details
Details for the file meanshift_rs-0.9.3-cp39-cp39-manylinux_2_28_x86_64.whl
.
File metadata
- Download URL: meanshift_rs-0.9.3-cp39-cp39-manylinux_2_28_x86_64.whl
- Upload date:
- Size: 1.3 MB
- Tags: CPython 3.9, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.13
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | bdbac3795e074a4c05e2eb71c052c83221418720e3d32ed14ffdad579042072d |
|
MD5 | 4c852fd807dbf95eef75b70854e8b60d |
|
BLAKE2b-256 | 34b16cfdc16866df12359362ee465f730cbb174f1a2d30b350ffd7da3425262e |
File details
Details for the file meanshift_rs-0.9.3-cp38-cp38-manylinux_2_28_x86_64.whl
.
File metadata
- Download URL: meanshift_rs-0.9.3-cp38-cp38-manylinux_2_28_x86_64.whl
- Upload date:
- Size: 1.3 MB
- Tags: CPython 3.8, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.8.13
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5d5865cc390ab3e37c67b409c55d1306356f73df798bd3c116346009464b36bf |
|
MD5 | 4b86e60cc71187745b4e53b13d7f41f0 |
|
BLAKE2b-256 | 885d748b966a6dd5829990afcc4d50f9983fcfe8fd7b0729d352d8ceb961d5d6 |
File details
Details for the file meanshift_rs-0.9.3-cp37-cp37m-manylinux_2_28_x86_64.whl
.
File metadata
- Download URL: meanshift_rs-0.9.3-cp37-cp37m-manylinux_2_28_x86_64.whl
- Upload date:
- Size: 1.3 MB
- Tags: CPython 3.7m, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.7.13
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 522997fdf600a29373a1332983924de9cb3ddb95a6c04b0f5ac92cd93ef5615f |
|
MD5 | 449251695df115385bfa79c76c790a18 |
|
BLAKE2b-256 | 84c0c0962627556a7bc2bdf7de295f5f5ca4496f2d917375d89814cd4a5e2d8c |