pub struct StochasticGD { /* private fields */ }Expand description
Stochastic Gradient Descent for batch optimization
Implementations§
Source§impl StochasticGD
impl StochasticGD
Sourcepub fn minimize<G>(
&self,
grad_f: G,
initial: &[f64],
n_samples: usize,
) -> Result<OptimizationResult>
pub fn minimize<G>( &self, grad_f: G, initial: &[f64], n_samples: usize, ) -> Result<OptimizationResult>
Minimizes using mini-batch gradient descent
§Arguments
grad_f- Gradient function that takes parameters and data indicesinitial- Initial parameter valuesn_samples- Total number of training samples
Auto Trait Implementations§
impl Freeze for StochasticGD
impl RefUnwindSafe for StochasticGD
impl Send for StochasticGD
impl Sync for StochasticGD
impl Unpin for StochasticGD
impl UnwindSafe for StochasticGD
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more