#classification #dataset #language #rs-ml

rs-ml

Simple ML crate including Gaussian Naive Bayesian classifier

8 releases

0.3.1 Apr 13, 2025
0.3.0 Mar 24, 2025
0.2.2 Feb 18, 2025
0.1.2 Feb 14, 2025

#15 in #classification

Download history 127/week @ 2025-02-04 290/week @ 2025-02-11 131/week @ 2025-02-18 8/week @ 2025-02-25 5/week @ 2025-03-04 88/week @ 2025-03-18 34/week @ 2025-03-25 6/week @ 2025-04-01 94/week @ 2025-04-08 28/week @ 2025-04-15 2/week @ 2025-04-22

131 downloads per month

MIT license

24KB
427 lines

rs-ml is a simple ML framework for the Rust language. it includes train test splitting, scalers, and a guassian naive bayes model. It also includes traits to add more transfomers and models to the framework.

Usage

This library requires a compute backend to perform matrix operations. Compute backends are exposed with provided feature flags. Refer to the ndarray_linalg docs for more information.


rs-ml

Crates.io Downloads (recent)

ML framework for the rust programming language. It includes traits for transfomers, models, and an implementation for scalers, and a gaussian Naive Bayesian classifier.

Usage

This library requires a compute backend to perform matrix operations. Compute backends are exposed with provided feature flags. Refer to the ndarray_linalg docs for more information.

Design

Classifiers

  • iterative
    • Can be trained with streaming data that does not fit in memory at the same time
  • non-iterative
    • Must have the entire dataset at one time to train the model
let a = csv::read_csv("filename.csv")?;
let features = Dataset::from_struct(a, |r| arr1[r.f1, r.f2, r.f3], |r| r.label)?;
let model = GaussianNB::fit(features)?;

Dependencies

~71MB
~893K SLoC