Struct rusty_machine::learning::optim::grad_desc::StochasticGD
[−]
[src]
pub struct StochasticGD { /* fields omitted */ }
Stochastic Gradient Descent algorithm.
Uses basic momentum to control the learning rate.
Methods
impl StochasticGD
[src]
fn new(alpha: f64, mu: f64, iters: usize) -> StochasticGD
Construct a stochastic gradient descent algorithm.
Requires the learning rate, momentum rate and iteration count to be specified.
Examples
use rusty_machine::learning::optim::grad_desc::StochasticGD; let sgd = StochasticGD::new(0.1, 0.3, 5);
Trait Implementations
impl Clone for StochasticGD
[src]
fn clone(&self) -> StochasticGD
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more
impl Copy for StochasticGD
[src]
impl Debug for StochasticGD
[src]
impl Default for StochasticGD
[src]
The default Stochastic GD algorithm.
The defaults are:
- alpha = 0.1
- mu = 0.1
- iters = 20
fn default() -> StochasticGD
Returns the "default value" for a type. Read more