Struct vikos::teacher::GradientDescentAl
[−]
[src]
pub struct GradientDescentAl { pub l0: f64, pub t: f64, }
Gradient descent with annealing learning rate
For the i-th event the learning rate is l = l0 * (1 + i/t)
Fields
l0: f64
Start learning rate
t: f64
Smaller t will decrease the learning rate faster
After t events the start learning rate will be a half l0
,
after two t events the learning rate will be one third l0
and so on.
Trait Implementations
impl<M> Teacher<M> for GradientDescentAl where M: Model
[src]
type Training = usize
Contains state which changes during the training, but is not part of the expertise Read more
fn new_training(&self, _: &M) -> usize
Creates an instance holding all mutable state of the algorithm
fn teach_event<Y, C>(&self, num_events: &mut usize, 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)