[][src]Struct optimization::StochasticGradientDescent

pub struct StochasticGradientDescent { /* fields omitted */ }

Provides stochastic Gradient Descent optimization.

Methods

impl StochasticGradientDescent[src]

pub fn new() -> StochasticGradientDescent[src]

Creates a new StochasticGradientDescent optimizer using the following defaults:

  • step_width = 0.01
  • mini_batch = 1
  • max_iterations = 1000

The used random number generator is randomly seeded.

pub fn seed(&mut self, seed: u64) -> &mut Self[src]

Seeds the random number generator using the supplied seed.

This is useful to create re-producable results.

pub fn max_iterations(&mut self, max_iterations: Option<u64>) -> &mut Self[src]

Adjusts the number of maximally run iterations. A value of None instructs the optimizer to ignore the nubmer of iterations.

pub fn mini_batch(&mut self, mini_batch: usize) -> &mut Self[src]

Adjusts the mini batch size, i.e., how many terms are considered in one step at most.

pub fn step_width(&mut self, step_width: f64) -> &mut Self[src]

Adjusts the step size applied for each mini batch.

Trait Implementations

impl Default for StochasticGradientDescent[src]

impl<F: Summation1> Minimizer<F> for StochasticGradientDescent[src]

type Solution = Solution

Type of the solution the Minimizer returns.

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,