[−][src]Struct optimization::StochasticGradientDescent
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]
Auto Trait Implementations
impl RefUnwindSafe for StochasticGradientDescent
impl Send for StochasticGradientDescent
impl Sync for StochasticGradientDescent
impl Unpin for StochasticGradientDescent
impl UnwindSafe for StochasticGradientDescent
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,