ferrolearn-bayes
Naive Bayes classifiers for the ferrolearn machine learning framework.
Algorithms
| Model | Best for |
|---|---|
GaussianNB |
Continuous features with Gaussian distributions |
MultinomialNB |
Discrete count data (e.g., word counts in text classification) |
BernoulliNB |
Binary/boolean features with optional binarization threshold |
ComplementNB |
Imbalanced datasets (complement-class variant of Multinomial NB) |
All classifiers support predict_proba for class probability estimates.
Example
use GaussianNB;
use ;
use ;
let x = from_shape_vec.unwrap;
let y = array!;
let model = new;
let fitted = model.fit.unwrap;
let predictions = fitted.predict.unwrap;
// Get class probabilities
let probas = fitted.predict_proba.unwrap;
License
Licensed under either of Apache License, Version 2.0 or MIT License at your option.