Struct gosh_lbfgs::LbfgsParam
source · [−]#[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: Orthantwise
initial_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
sourceimpl Clone for LbfgsParam
impl Clone for LbfgsParam
sourcefn clone(&self) -> LbfgsParam
fn clone(&self) -> LbfgsParam
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for LbfgsParam
impl Debug for LbfgsParam
sourceimpl Default for LbfgsParam
impl Default for LbfgsParam
impl Copy for LbfgsParam
Auto Trait Implementations
impl RefUnwindSafe for LbfgsParam
impl Send for LbfgsParam
impl Sync for LbfgsParam
impl Unpin for LbfgsParam
impl UnwindSafe for LbfgsParam
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more