Struct argmin::gradientdescent::GradientDescent
[−]
[src]
pub struct GradientDescent<'a> { /* fields omitted */ }
Gradient Descent struct (duh)
Methods
impl<'a> GradientDescent<'a>
[src]
fn new() -> Self
[src]
Return a GradientDescent struct
fn gamma_update(&mut self, gamma_update_method: GDGammaUpdate<'a>) -> &mut Self
[src]
Set gradient descent gamma update method
fn max_iters(&mut self, max_iters: u64) -> &mut Self
[src]
Set maximum number of iterations
fn precision(&mut self, precision: f64) -> &mut Self
[src]
Set precision
Trait Implementations
impl<'a> ArgminSolver<'a> for GradientDescent<'a>
[src]
type Parameter = Array1<f64>
Parameter vector
type CostValue = f64
Cost value
type Hessian = Array1<f64>
Hessian
type StartingPoints = Array1<f64>
Initial parameter(s)
type ProblemDefinition = Problem<'a, Self::Parameter, Self::CostValue, Self::Hessian>
Type of Problem (TODO: Trait!)
fn init(
&mut self,
problem: &'a Self::ProblemDefinition,
init_param: &Self::StartingPoints
) -> Result<(), Error>
[src]
&mut self,
problem: &'a Self::ProblemDefinition,
init_param: &Self::StartingPoints
) -> Result<(), Error>
Initialize with a given problem and a starting point
fn next_iter(
&mut self
) -> Result<ArgminResult<Self::Parameter, Self::CostValue>, Error>
[src]
&mut self
) -> Result<ArgminResult<Self::Parameter, Self::CostValue>, Error>
Compute next point
fn terminate(&self) -> bool
[src]
Indicates whether any of the stopping criteria are met
fn run(
&mut self,
operator: &'a Self::ProblemDefinition,
init_param: &Self::StartingPoints
) -> Result<ArgminResult<Self::Parameter, Self::CostValue>, Error>
[src]
&mut self,
operator: &'a Self::ProblemDefinition,
init_param: &Self::StartingPoints
) -> Result<ArgminResult<Self::Parameter, Self::CostValue>, Error>
Run initialization and iterations at once