Skip to main content

Module optim

Module optim 

Source
Expand description

Optimisation: the objective and optimiser interfaces, the optimiser registry, and the algorithms.

Every optimiser minimises an Objective through the same Optimizer trait and reports to the same ProgressSink, which can also cancel the run. All of them stop when the target fidelity is reached, return the best point they evaluated, and never see threads: parallelism lives inside the objective.

A new algorithm is one type implementing Optimizer plus one entry in optimizer and optimizer_names; Monitor gives it progress reports, cancellation, the target check and best-point tracking.

Structs§

Bobyqa
BOBYQA, Powell’s bound-constrained quadratic-model trust-region method. Initial trust radius 0.5.
Cobyla
COBYLA, Powell’s linear-approximation trust-region method. Initial trust radius 1.0, as in scipy.
ConsoleSink
A sink that prints an iteration table to standard output, every every-th row.
Eval
One evaluation of the objective.
IterationReport
One row of progress.
LBfgs
Limited-memory BFGS with a Moré–Thuente line search.
Monitor
Bookkeeping every optimiser shares: progress reports, the stop checks and the best point.
NewtonCg
Line-search Newton-CG with exact Hessian-vector products.
NewtonExact
Newton’s method in a trust region on the exact Hessian, with the subproblem solved by Steihaug’s truncated conjugate gradients, so indefinite Hessians are handled.
NoProgress
A sink that ignores everything.
OptimResult
What an optimisation produced.
RecordingSink
A sink that keeps every report.
RunControl
Run settings shared by every optimiser.

Enums§

Derivatives
What an optimiser asks the objective for.
Exit
Why an optimisation ended.

Traits§

Objective
A function to minimise.
Optimizer
An optimisation algorithm.
ProgressSink
Something that watches an optimisation and can stop it.

Functions§

optimizer
The optimiser with configuration name name.
optimizer_names
Every optimiser name, in the order the interface lists them.