rs-ml

Crates.iors-ml
lib.rsrs-ml
version0.3.2
created_at2025-02-10 05:20:14.272824+00
updated_at2025-07-04 01:32:49.191837+00
descriptionSimple ML crate including Gaussian Naive Bayesian classifier
homepage
repositoryhttps://github.com/coenvalk/rs-ml
max_upload_size
id1549592
size92,767
Coen Valk (coenvalk)

documentation

README

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)?;

Commit count: 48

cargo fmt