public class PowellOptimizer extends MultivariateOptimizer
optimize.py
v0.5 of
SciPy).
LineSearch
class.
optimize
will throw
MathUnsupportedOperationException
if bounds are passed to it.
In order to impose simple constraints, the objective function must be
wrapped in an adapter like
MultivariateFunctionMappingAdapter
or
MultivariateFunctionPenaltyAdapter
.Modifier and Type | Field and Description |
---|---|
private double |
absoluteThreshold
Absolute threshold.
|
private LineSearch |
line
Line search.
|
private static double |
MIN_RELATIVE_TOLERANCE
Minimum relative tolerance.
|
private double |
relativeThreshold
Relative threshold.
|
evaluations, iterations
Constructor and Description |
---|
PowellOptimizer(double rel,
double abs)
The parameters control the default convergence checking procedure.
|
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.
|
PowellOptimizer(double rel,
double abs,
double lineRel,
double lineAbs)
Builds an instance with the default convergence checking procedure.
|
PowellOptimizer(double rel,
double abs,
double lineRel,
double lineAbs,
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.
|
Modifier and Type | Method and Description |
---|---|
private void |
checkParameters() |
protected PointValuePair |
doOptimize()
Performs 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.
|
computeObjectiveValue, getGoalType, optimize, parseOptimizationData
getLowerBound, getStartPoint, getUpperBound
getConvergenceChecker, getEvaluations, getIterations, getMaxEvaluations, getMaxIterations, incrementEvaluationCount, incrementIterationCount, optimize
private static final double MIN_RELATIVE_TOLERANCE
private final double relativeThreshold
private final double absoluteThreshold
private final LineSearch line
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, double lineRel, double lineAbs, ConvergenceChecker<PointValuePair> checker)
rel
- Relative threshold for this optimizer.abs
- Absolute threshold for this optimizer.lineRel
- Relative threshold for the internal line search optimizer.lineAbs
- Absolute threshold for the internal line search optimizer.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)
.public PowellOptimizer(double rel, double abs, double lineRel, double lineAbs)
rel
- Relative threshold.abs
- Absolute threshold.lineRel
- Relative threshold for the internal line search optimizer.lineAbs
- Absolute threshold for the internal line search optimizer.NotStrictlyPositiveException
- if abs <= 0
.NumberIsTooSmallException
- if rel < 2 * Math.ulp(1d)
.protected PointValuePair doOptimize()
doOptimize
in class BaseOptimizer<PointValuePair>
private double[][] newPointAndDirection(double[] p, double[] d, double optimum)
p
- Point used in the line search.d
- Direction used in the line search.optimum
- Optimum found by the line search.private void checkParameters()
MathUnsupportedOperationException
- if bounds were passed to the
optimize
method.