Package org.apache.commons.math.optimization
This package provides common interfaces for the optimization algorithms
provided in sub-packages. The main interfaces defines optimizers and convergence
checkers. The functions that are optimized by the algorithms provided by this
package and its sub-packages are a subset of the one defined in the analysis
package, namely the real and vector valued functions. These functions are called
objective function here. When the goal is to minimize, the functions are often called
cost function, this name is not used in this package.
Optimizers are the algorithms that will either minimize or maximize, the objective function by changing its input variables set until an optimal set is found. There are only four interfaces defining the common behavior of optimizers, one for each supported type of objective function:
UnivariateRealOptimizer
forunivariate real functions
MultivariateRealOptimizer
formultivariate real functions
DifferentiableMultivariateRealOptimizer
fordifferentiable multivariate real functions
DifferentiableMultivariateVectorialOptimizer
fordifferentiable multivariate vectorial functions
Despite there are only four types of supported optimizers, it is possible to optimize a
transform a non-differentiable multivariate vectorial function
by converting it to a non-differentiable multivariate
real function
thanks to the LeastSquaresConverter
helper class.
The transformed function can be optimized using any implementation of the MultivariateRealOptimizer
interface.
For each of the four types of supported optimizers, there is a special implementation which wraps a classical optimizer in order to add it a multi-start feature. This feature call the underlying optimizer several times in sequence with different starting points and returns the best optimum found or all optima if desired. This is a classical way to prevent being trapped into a local extremum when looking for a global one.
-
Interface Summary Interface Description DifferentiableMultivariateRealOptimizer This interface represents an optimization algorithm forscalar differentiable objective functions
.DifferentiableMultivariateVectorialOptimizer This interface represents an optimization algorithm forvectorial differentiable objective functions
.MultivariateRealOptimizer This interface represents an optimization algorithm forscalar objective functions
.RealConvergenceChecker This interface specifies how to check if anoptimization algorithm
has converged.UnivariateRealOptimizer Interface for (univariate real) optimization algorithms.VectorialConvergenceChecker This interface specifies how to check if aoptimization algorithm
has converged. -
Class Summary Class Description LeastSquaresConverter This class convertsvectorial objective functions
toscalar objective functions
when the goal is to minimize them.MultiStartDifferentiableMultivariateRealOptimizer Special implementation of theDifferentiableMultivariateRealOptimizer
interface adding multi-start features to an existing optimizer.MultiStartDifferentiableMultivariateVectorialOptimizer Special implementation of theDifferentiableMultivariateVectorialOptimizer
interface adding multi-start features to an existing optimizer.MultiStartMultivariateRealOptimizer Special implementation of theMultivariateRealOptimizer
interface adding multi-start features to an existing optimizer.MultiStartUnivariateRealOptimizer Special implementation of theUnivariateRealOptimizer
interface adding multi-start features to an existing optimizer.RealPointValuePair This class holds a point and the value of an objective function at this point.SimpleRealPointChecker Simple implementation of theRealConvergenceChecker
interface using only point coordinates.SimpleScalarValueChecker Simple implementation of theRealConvergenceChecker
interface using only objective function values.SimpleVectorialPointChecker Simple implementation of theVectorialConvergenceChecker
interface using only point coordinates.SimpleVectorialValueChecker Simple implementation of theVectorialConvergenceChecker
interface using only objective function values.VectorialPointValuePair This class holds a point and the vectorial value of an objective function at this point. -
Enum Summary Enum Description GoalType Goal type for an optimization problem. -
Exception Summary Exception Description OptimizationException Deprecated. in 2.2 (to be removed in 3.0).