#[repr(C)]
pub struct LbfgsParam { pub m: usize, pub epsilon: f64, pub past: usize, pub delta: f64, pub max_iterations: usize, pub max_evaluations: usize, pub linesearch: LineSearch, pub orthantwise: bool, pub owlqn: Orthantwise, pub initial_inverse_hessian: f64, pub max_step_size: f64, pub damping: bool, }
Expand description

L-BFGS optimization parameters.

Call lbfgs_parameter_t::default() function to initialize parameters to the default values.

Fields

m: usize

The number of corrections to approximate the inverse hessian matrix.

The L-BFGS routine stores the computation results of previous \ref m iterations to approximate the inverse hessian matrix of the current iteration. This parameter controls the size of the limited memories (corrections). The default value is 6. Values less than 3 are not recommended. Large values will result in excessive computing time.

epsilon: f64

Epsilon for convergence test.

This parameter determines the accuracy with which the solution is to be found. A minimization terminates when

||g|| < epsilon * max(1, ||x||),

where ||.|| denotes the Euclidean (L2) norm. The default value is \c 1e-5.

past: usize

Distance for delta-based convergence test.

This parameter determines the distance, in iterations, to compute the rate of decrease of the objective function. If the value of this parameter is zero, the library does not perform the delta-based convergence test.

The default value is 0.

delta: f64

Delta for convergence test.

This parameter determines the minimum rate of decrease of the objective function. The library stops iterations when the following condition is met: |f’ - f| / f < delta, where f’ is the objective value of past iterations ago, and f is the objective value of the current iteration. The default value is 1e-5.

max_iterations: usize

The maximum number of LBFGS iterations.

The lbfgs optimization terminates when the iteration count exceedes this parameter.

Setting this parameter to zero continues an optimization process until a convergence or error. The default value is 0.

max_evaluations: usize

The maximum allowed number of evaluations of function value and gradients. This number could be larger than max_iterations since line search procedure may involve one or more evaluations.

Setting this parameter to zero continues an optimization process until a convergence or error. The default value is 0.

linesearch: LineSearch

The line search options.

This parameter specifies a line search algorithm to be used by the L-BFGS routine.

orthantwise: bool

Enable OWL-QN regulation or not

owlqn: Orthantwiseinitial_inverse_hessian: f64

A factor for scaling initial step size.

max_step_size: f64

The maximum allowed step size for each optimization step, useful for preventing wild step.

damping: bool

Powell damping

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Initialize L-BFGS parameters to the default values.

Call this function to fill a parameter structure with the default values and overwrite parameter values if necessary.

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

🔬 This is a nightly-only experimental API. (toowned_clone_into)

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.