Skip to main content

GradientDescent

Struct GradientDescent 

Source
pub struct GradientDescent {
    pub abs_tol: Tolerances,
    pub dual: bool,
    pub error_norm: Norm,
    pub line_search: LineSearch,
    pub max_steps: usize,
    pub rel_tol: Option<Scalar>,
}
Expand description

The method of gradient descent.

Fields§

§abs_tol: Tolerances

Absolute error tolerances.

§dual: bool

Lagrangian dual.

§error_norm: Norm

Norm type for error evaluation.

§line_search: LineSearch

Line search algorithm.

§max_steps: usize

Maximum number of steps.

§rel_tol: Option<Scalar>

Relative error tolerance.

Trait Implementations§

Source§

impl Debug for GradientDescent

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for GradientDescent

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl<F, J, X, E> FirstOrderOptimization<F, J, X> for GradientDescent
where F: Erase<Erased = Scalar> + Tensor, <J as Tensor>::Unit: UnitMul<<X as Tensor>::Unit>, <<J as Tensor>::Unit as UnitMul<<X as Tensor>::Unit>>::Output: UnitSum, <<<J as Tensor>::Unit as UnitMul<<X as Tensor>::Unit>>::Output as UnitSum>::Output: Is<<F as Tensor>::Unit>, J: Erase<Erased = E> + Jacobian + Mul<StepSize<J, X>, Output = X>, for<'a> &'a J: Mul<StepSize<J, X>, Output = X>, X: Erase<Erased = E> + Jacobian + Solution, <X as Tensor>::Unit: UnitDiv<<J as Tensor>::Unit>, E: Tensor, for<'a> &'a Matrix: Mul<&'a X, Output = Vector>,

Source§

fn minimize( &self, function: impl FnMut(&X) -> Result<F, String>, jacobian: impl FnMut(&X) -> Result<J, String>, initial_guess: X, equality_constraint: EqualityConstraint, ) -> Result<X, OptimizationError>

Source§

impl<F, X, E> ZerothOrderRootFinding<F, X> for GradientDescent
where F: Erase<Erased = E> + Jacobian + Mul<StepSize<F, X>, Output = X>, for<'a> &'a F: Mul<StepSize<F, X>, Output = X>, X: Erase<Erased = E> + Jacobian + Solution, <X as Tensor>::Unit: UnitDiv<<F as Tensor>::Unit>, E: Tensor, for<'a> &'a Matrix: Mul<&'a X, Output = Vector>,

Source§

fn root( &self, function: impl FnMut(&X) -> Result<F, String>, initial_guess: X, equality_constraint: EqualityConstraint, ) -> Result<X, OptimizationError>

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Is<T> for T

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.