Struct vikos::teacher::GradientDescent
[−]
[src]
pub struct GradientDescent { pub learning_rate: f64, }
Gradient descent
Simplest possible implementation of gradient descent with fixed learning rate
Fields
learning_rate: f64
Defines how fast the coefficents of the trained Model
will change
Trait Implementations
impl<M> Teacher<M> for GradientDescent where M: Model
[src]
type Training = ()
Contains state which changes during the training, but is not part of the expertise Read more
fn new_training(&self, _: &M)
Creates an instance holding all mutable state of the algorithm
fn teach_event<Y, C>(&self, _training: &mut (), 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)