Skip to main content

GradientBasedMinimizationEngine

Trait GradientBasedMinimizationEngine 

Source
pub trait GradientBasedMinimizationEngine<T, U>: MinimizationControls {
    // Required method
    fn gradient_based_minimize(
        &self,
        objective_function: &T,
        gradient_function: &U,
        initial_parameters: Vec<f64>,
    ) -> Result<OptimizationResult, ErrorsJSL>
       where T: ObjectiveFunction,
             U: GradientFunction;
}
Expand description

Gradient Based Minimization Engine trait that extends the MinimizationControls trait and has a method gradient_based_minimize that takes an objective function, an initial guess for the parameters, and returns the parameters that minimize the objective function.
This trait is intended for optimization algorithms that require the use of gradients, such as gradient descent or Newton’s method. The method takes an additional argument for the gradient function, which is used to compute the gradient of the objective function at the current parameters. The optimization algorithm can then use this gradient information to update the parameters in the direction of steepest descent, or to compute a search direction for more advanced optimization methods.

Required Methods§

Source

fn gradient_based_minimize( &self, objective_function: &T, gradient_function: &U, initial_parameters: Vec<f64>, ) -> Result<OptimizationResult, ErrorsJSL>

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§