Expand description
Core functionality Argmin Optimizaton toolbox core
This crate contains the core functionality of argmin. If you just want to run an optimization method, this is not what you are looking for. However, if you want to implement your own solver based on the argmin architecture, you should find all necessary tools here.
Re-exports
pub use executor::*;
Modules
Executor
Output parameter vectors to file
Macros
Loggers based on the slog
crate
Structs
Checkpoint
The datastructure which is returned by the next_iter
method of the Solver
trait.
A simple key-value storage
Final struct returned by the run
method of Executor
.
This type is necessary in order to be able to implement slog::KV
on ArgminKV
A logger based on slog
The Error
type, a wrapper around a dynamic error type.
Maintains the state from iteration to iteration of a solver
Minimal No-op operator which does nothing, really.
Fake Operators for testing No-op operator with free choice of the types
Container for observers which acts just like a single Observe
r by implementing Observe
on
it.
This wraps an operator and keeps track of how often the cost, gradient and Hessian have been computed and how often the modify function has been called. Usually, this is an implementation detail unless a solver is needed within another solver (such as a line search within a gradient descent method).
Write parameter vectors to file
Enums
Argmin error type
Defines at which intervals a checkpoint is saved.
This is used to indicate how often the observer will observe the status. Never
deactivates
the observer, Always
and Every(i)
will call the observer in every or every ith iteration,
respectively. NewBest
will call the observer only, if a new best solution is found.
Indicates why the optimization algorithm stopped
Different kinds of serializers
Traits
Add a T
to self
Return the conjugate
(Pointwise) Divide a T
by self
Dot/scalar product of T
and self
Identity matrix
Trait alias to simplify common trait bounds
Compute the inverse (T
) of self
Defines a common interface for line search methods.
Minimum and Maximum of type T
(Pointwise) Multiply a T
with self
Common interface for beta update methods (Nonlinear-CG)
Compute the l2-norm (U
) of self
This trait needs to be implemented for every operator/cost function.
Create a random number
Add a T
scaled by an U
to self
Subtract a T
scaled by an U
from self
Subtract a T
from self
Return the transpose (U
) of self
Defines a common interface to methods which calculate approximate steps for trust region methods.
Dot/scalar product of T
and self
weighted by W (p^TWv)
Return param vector of all zeros (for now, this is a hack. It should be done better)
Zero for dynamically sized objects
Defines the interface every Observer needs to expose
Solver
Functions
Load a checkpoint from disk