|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.commons.math3.optimization.direct.BaseAbstractMultivariateOptimizer<MultivariateFunction>
org.apache.commons.math3.optimization.direct.PowellOptimizer
public class PowellOptimizer
Powell algorithm.
This code is translated and adapted from the Python version of this
algorithm (as implemented in module optimize.py
v0.5 of
SciPy).
The default stopping criterion is based on the differences of the
function value between two successive iterations. It is however possible
to define a custom convergence checker that might terminate the algorithm
earlier.
Nested Class Summary | |
---|---|
private class |
PowellOptimizer.LineSearch
Class for finding the minimum of the objective function along a given direction. |
Field Summary | |
---|---|
private double |
absoluteThreshold
Absolute threshold. |
private PowellOptimizer.LineSearch |
line
Line search. |
private static double |
MIN_RELATIVE_TOLERANCE
Minimum relative tolerance. |
private double |
relativeThreshold
Relative threshold. |
Fields inherited from class org.apache.commons.math3.optimization.direct.BaseAbstractMultivariateOptimizer |
---|
evaluations |
Constructor Summary | |
---|---|
PowellOptimizer(double rel,
double abs)
The parameters control the default convergence checking procedure, and the line search tolerances. |
|
PowellOptimizer(double rel,
double abs,
ConvergenceChecker<PointValuePair> checker)
This constructor allows to specify a user-defined convergence checker, in addition to the parameters that control the default convergence checking procedure and the line search tolerances. |
Method Summary | |
---|---|
protected PointValuePair |
doOptimize()
Perform the bulk of the optimization algorithm. |
private double[][] |
newPointAndDirection(double[] p,
double[] d,
double optimum)
Compute a new point (in the original space) and a new direction vector, resulting from the line search. |
Methods inherited from class org.apache.commons.math3.optimization.direct.BaseAbstractMultivariateOptimizer |
---|
computeObjectiveValue, getConvergenceChecker, getEvaluations, getGoalType, getMaxEvaluations, getStartPoint, optimize |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.apache.commons.math3.optimization.BaseMultivariateOptimizer |
---|
optimize |
Methods inherited from interface org.apache.commons.math3.optimization.BaseOptimizer |
---|
getConvergenceChecker, getEvaluations, getMaxEvaluations |
Field Detail |
---|
private static final double MIN_RELATIVE_TOLERANCE
private final double relativeThreshold
private final double absoluteThreshold
private final PowellOptimizer.LineSearch line
Constructor Detail |
---|
public PowellOptimizer(double rel, double abs, ConvergenceChecker<PointValuePair> checker)
rel
- Relative threshold.abs
- Absolute threshold.checker
- Convergence checker.
NotStrictlyPositiveException
- if abs <= 0
.
NumberIsTooSmallException
- if rel < 2 * Math.ulp(1d)
.public PowellOptimizer(double rel, double abs)
rel
- Relative threshold.abs
- Absolute threshold.
NotStrictlyPositiveException
- if abs <= 0
.
NumberIsTooSmallException
- if rel < 2 * Math.ulp(1d)
.Method Detail |
---|
protected PointValuePair doOptimize()
doOptimize
in class BaseAbstractMultivariateOptimizer<MultivariateFunction>
private double[][] newPointAndDirection(double[] p, double[] d, double optimum)
p
and d
will be changed in-place.
p
- Point used in the line search.d
- Direction used in the line search.optimum
- Optimum found by the line search.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |