| Crates.io | sklears-naive-bayes |
| lib.rs | sklears-naive-bayes |
| version | 0.1.0-beta.1 |
| created_at | 2025-10-13 13:23:44.352657+00 |
| updated_at | 2026-01-01 21:33:44.967935+00 |
| description | Naive Bayes classifiers for sklears - scikit-learn compatible ML in Rust |
| homepage | https://github.com/cool-japan/sklears |
| repository | https://github.com/cool-japan/sklears |
| max_upload_size | |
| id | 1880515 |
| size | 2,037,497 |
Latest release:
0.1.0-beta.1(January 1, 2026). See the workspace release notes for highlights and upgrade guidance.
sklears-naive-bayes implements the full family of Naive Bayes estimators with scikit-learn compatible APIs and Rust-powered performance.
use sklears_naive_bayes::MultinomialNB;
use scirs2_core::ndarray::{array, Array1};
let x = array![
[1u32, 0, 2],
[0, 1, 1],
[3, 0, 0],
];
let y = Array1::from(vec![0, 1, 0]);
let model = MultinomialNB::builder()
.alpha(1.0)
.fit_prior(true)
.build();
let fitted = model.fit(&x, &y)?;
let log_probs = fitted.predict_log_proba(&x)?;
0.1.0-beta.1.TODO.md.