Skip to main content

Module optimizers

Module optimizers 

Source
Expand description

Numerical optimizers minimizing an Objective.

Every optimizer in this module reduces a scalar objective f: ℝⁿ → ℝ and returns an OptimizeResult reporting the located point, its objective value, the iteration count, and a ConvergenceStatus. The families are grouped into subfolders: gradient (first-order learning-rate methods and conjugate gradient), second_order (Newton and L-BFGS), and stochastic (simulated annealing and genetic / differential evolution). The shared test objectives live in objectives.

§scipy.optimize mapping

Each optimizer is paired with the scipy.optimize method it is cross-checked against; methods with no faithful counterpart are documented as excluded so the comparison coverage is auditable.

stats-clawscipy.optimizeagreement
gradient_descentnone (vanilla GD)excluded
sgdnoneexcluded
adamnoneexcluded
rmspropnoneexcluded
adagradnoneexcluded
conjugate_gradientminimize(method="CG")compared
newtonminimize(method="Newton-CG")compared
lbfgsminimize(method="L-BFGS-B")compared
simulated_annealingdual_annealingoptimum
geneticdifferential_evolutionoptimum

Deterministic optimizers (exempt from the seed-variation check): gradient_descent, adam, rmsprop, adagrad, conjugate_gradient, newton, lbfgs. Stochastic optimizers (seed-variation required): sgd, simulated_annealing, genetic.

Modules§

gradient
First-order optimizers: learning-rate methods (gradient descent, SGD, Adam, RMSProp, AdaGrad) and the Fletcher–Reeves conjugate gradient.
objectives
Standard test objectives for the optimizer suite.
second_order
Second-order optimizers: Newton’s method (Hessian-based) and L-BFGS (limited- memory quasi-Newton).
stochastic
Derivative-free stochastic optimizers: simulated annealing and a genetic (differential-evolution) optimizer.

Structs§

OptimizeResult
The result of minimizing an Objective.

Enums§

ConvergenceStatus
Outcome of an optimization run: whether the stopping criterion was satisfied.

Traits§

Objective
A differentiable scalar objective f: ℝⁿ → ℝ to be minimized.

Functions§

dot
Dot product of two equal-length vectors (extra elements of the longer one are ignored, which never happens for the matched-length inputs used internally).
matvec
Multiplies a square matrix (row-major Vec<Vec<f64>>) by a vector.
norm
Euclidean (L2) norm of a vector.