Trait vikos::Teacher
[−]
[src]
pub trait Teacher<M: Model> { type Training; fn new_training(&self, model: &M) -> Self::Training; fn teach_event<Y, C>(&self, training: &mut Self::Training, model: &mut M, cost: &C, features: &M::Input, truth: Y) where C: Cost<Y>, Y: Copy; }
Algorithms used to adapt Model coefficents
Associated Types
type Training
Contains state which changes during the training, but is not part of the expertise
Examples are the velocity of the coefficents (in stochastic gradient descent) or the number of events already learned. This may also be empty
Required Methods
fn new_training(&self, model: &M) -> Self::Training
Creates an instance holding all mutable state of the algorithm
fn teach_event<Y, C>(&self, training: &mut Self::Training, model: &mut M, cost: &C, features: &M::Input, truth: Y) where C: Cost<Y>, Y: Copy
Changes model
s coefficents so they minimize the cost
function (hopefully)
Implementors
impl<M> Teacher<M> for GradientDescent where M: Model
impl<M> Teacher<M> for GradientDescentAl where M: Model
impl<M> Teacher<M> for Momentum where M: Model
impl<M> Teacher<M> for Nesterov where M: Model