Trait vikos::Model [] [src]

pub trait Model: Clone {
    type Input;
    type Target: Float;
    fn predict(&self, &Self::Input) -> Self::Target;
    fn num_coefficents(&self) -> usize;
    fn gradient(&self, coefficent: usize, input: &Self::Input) -> Self::Target;
    fn coefficent(&mut self, coefficent: usize) -> &mut Self::Target;
}

A Model is defines how to predict a target from an input

A model usually depends on several coefficents whose values are derived using a training algorithm

Associated Types

Input features

Target type

Required Methods

Predicts a target for the inputs based on the internal coefficents

The number of internal coefficents this model depends on

Value predict derived by the n-th coefficent at input

Mutable reference to the n-th coefficent

Implementors