Expand description
Supervised classification algorithms.
Each fitted model reports its scores through the shared
ClassificationResult parameter struct.
The first classifier is deterministic, closed-form Naive Bayes in two
variants — Gaussian (continuous features) and Categorical (discrete features)
— living in naive_bayes. Both reproduce scikit-learn’s
sklearn.naive_bayes.GaussianNB / CategoricalNB semantics exactly: all
scoring is done in log space (no underflow), priors are the training class
frequencies, and argmax ties break toward the lower class label. Each fitted
model can emit a populated ClassificationResult via its classification_result
method, computing accuracy plus macro-averaged precision / recall / F1 from
predictions against the true labels.
This module also houses the input-validation, log-space, and metric helpers shared by every classifier in the family; they are module-private and reached from the submodules.
Re-exports§
pub use types::*;
Modules§
- naive_
bayes - Naive Bayes classifiers, for the shared classification parameter structs.
- types
- Plain-data parameter structs for the library’s statistical constructs.