Struct rusty_machine::learning::optim::grad_desc::GradientDesc [] [src]

pub struct GradientDesc {
    // some fields omitted
}

Batch Gradient Descent algorithm

Methods

impl GradientDesc
[src]

fn new(alpha: f64, iters: usize) -> GradientDesc

Construct a gradient descent algorithm.

Requires the step size and iteration count to be specified.

Examples

use rusty_machine::learning::optim::grad_desc::GradientDesc;

let gd = GradientDesc::new(0.3, 10000);

Trait Implementations

impl Debug for GradientDesc
[src]

fn fmt(&self, __arg_0: &mut Formatter) -> Result

Formats the value using the given formatter.

impl Copy for GradientDesc
[src]

impl Clone for GradientDesc
[src]

fn clone(&self) -> GradientDesc

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 Default for GradientDesc
[src]

The default gradient descent algorithm.

The defaults are:

fn default() -> GradientDesc

Returns the "default value" for a type. Read more

impl<M: Optimizable> OptimAlgorithm<M> for GradientDesc
[src]

fn optimize(&self, model: &M, start: &[f64], inputs: &M::Inputs, targets: &M::Targets) -> Vec<f64>

Return the optimized parameter using gradient optimization. Read more