pub trait SupModel<T, U> {
    fn predict(&self, inputs: &T) -> LearningResult<U>;
    fn train(&mut self, inputs: &T, targets: &U) -> LearningResult<()>;
}
Expand description

Trait for supervised model.

Required Methods

Predict output from inputs.

Train the model using inputs and targets.

Implementors

Supervised model trait for the GLM.

Predictions are made from the model by computing g^-1(Xb).

The model is trained using Iteratively Re-weighted Least Squares.

Train the model using the Pegasos algorithm and predict the model output from new data.

Supervised learning for the Neural Network.

The model is trained using back propagation.

Train and predict from the Naive Bayes model.

The input matrix must be rows made up of features. The target matrix should have indicator vectors in each row specifying the input class. e.g. [[1,0,0],[0,0,1]] shows class 1 first, then class 3.