Skip to main content

Rust version of the MeanShift clustering algorithm that does not need a predefined number of clusters.

Project description

MeanShift-rs

pipeline status coverage report

Git tag

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

meanshift_rs-0.9.3-cp39-cp39-manylinux_2_28_x86_64.whl (1.3 MB view hashes)

Uploaded CPython 3.9 manylinux: glibc 2.28+ x86-64

meanshift_rs-0.9.3-cp38-cp38-manylinux_2_28_x86_64.whl (1.3 MB view hashes)

Uploaded CPython 3.8 manylinux: glibc 2.28+ x86-64

meanshift_rs-0.9.3-cp37-cp37m-manylinux_2_28_x86_64.whl (1.3 MB view hashes)

Uploaded CPython 3.7m manylinux: glibc 2.28+ x86-64

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page