Struct rusty_machine::learning::optim::grad_desc::GradientDesc
source · [−]pub struct GradientDesc { /* private fields */ }
Expand description
Batch Gradient Descent algorithm
Implementations
sourceimpl GradientDesc
impl GradientDesc
sourcepub fn new(alpha: f64, iters: usize) -> GradientDesc
pub 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
sourceimpl Clone for GradientDesc
impl Clone for GradientDesc
sourcefn clone(&self) -> GradientDesc
fn clone(&self) -> GradientDesc
Returns a copy of the value. Read more
1.0.0const fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresourceimpl Debug for GradientDesc
impl Debug for GradientDesc
sourceimpl Default for GradientDesc
impl Default for GradientDesc
The default gradient descent algorithm.
The defaults are:
- alpha = 0.3
- iters = 100
sourcefn default() -> GradientDesc
fn default() -> GradientDesc
Returns the “default value” for a type. Read more
sourceimpl<M: Optimizable> OptimAlgorithm<M> for GradientDesc
impl<M: Optimizable> OptimAlgorithm<M> for GradientDesc
impl Copy for GradientDesc
Auto Trait Implementations
impl RefUnwindSafe for GradientDesc
impl Send for GradientDesc
impl Sync for GradientDesc
impl Unpin for GradientDesc
impl UnwindSafe for GradientDesc
Blanket Implementations
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstablefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<T> ToOwned for Twhere
T: Clone,
impl<T> ToOwned for Twhere
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
fn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
Uses borrowed data to replace owned data, usually by cloning. Read more