pub struct TrustRegion<R, F> { /* private fields */ }
Expand description

Trust region method

The trust region method approximates the cost function within a certain region around the current point in parameter space. Depending on the quality of this approximation, the region is either expanded or contracted.

The calculation of the actual step length and direction is performed by a method which implements TrustRegionRadius, such as:

Requirements on the optimization problem

The optimization problem is required to implement CostFunction, Gradient and Hessian.

Reference

Jorge Nocedal and Stephen J. Wright (2006). Numerical Optimization. Springer. ISBN 0-387-30303-0.

Implementations

Construct a new instance of TrustRegion

Example
use argmin::solver::trustregion::{CauchyPoint, TrustRegion};
let cp: CauchyPoint<f64> = CauchyPoint::new();
let tr: TrustRegion<_, f64> = TrustRegion::new(cp);

Set radius

Defaults to 1.0.

Example
let cp: CauchyPoint<f64> = CauchyPoint::new();
let tr: TrustRegion<_, f64> = TrustRegion::new(cp).with_radius(0.8)?;

Set maximum radius

Defaults to 100.0.

Example
let cp: CauchyPoint<f64> = CauchyPoint::new();
let tr: TrustRegion<_, f64> = TrustRegion::new(cp).with_max_radius(1000.0)?;

Set eta

Must lie in [0, 1/4) and defaults to 0.125.

Example
let cp: CauchyPoint<f64> = CauchyPoint::new();
let tr: TrustRegion<_, f64> = TrustRegion::new(cp).with_eta(0.2)?;

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Deserialize this value from the given Serde deserializer. Read more

Serialize this value into the given Serde serializer. Read more

Name of the solver. Mainly used in Observers.

Initializes the algorithm. Read more

Computes a single iteration of the algorithm and has access to the optimization problem definition and the internal state of the solver. Returns an updated state and optionally a KV which holds key-value pairs used in Observers. Read more

Used to implement stopping criteria, in particular criteria which are not covered by (terminate_internal. Read more

Checks whether basic termination reasons apply. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

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

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.