Class PowellOptimizer
- java.lang.Object
-
- org.apache.commons.math.optimization.general.AbstractScalarDifferentiableOptimizer
-
- org.apache.commons.math.optimization.direct.PowellOptimizer
-
- All Implemented Interfaces:
DifferentiableMultivariateRealOptimizer
public class PowellOptimizer extends AbstractScalarDifferentiableOptimizer
Powell algorithm. This code is translated and adapted from the Python version of this algorithm (as implemented in moduleoptimize.py
v0.5 of SciPy).- Since:
- 2.2
- Version:
- $Revision$ $Date$
-
-
Field Summary
Fields Modifier and Type Field Description static double
DEFAULT_LS_ABSOLUTE_TOLERANCE
Default absolute tolerance for line search (1.0E-11).static double
DEFAULT_LS_RELATIVE_TOLERANCE
Default relative tolerance for line search (1.0E-7).-
Fields inherited from class org.apache.commons.math.optimization.general.AbstractScalarDifferentiableOptimizer
checker, DEFAULT_MAX_ITERATIONS, goal, point
-
-
Constructor Summary
Constructors Constructor Description PowellOptimizer()
Constructor with default line search tolerances (see theother constructor
).PowellOptimizer(double lsRelativeTolerance)
Constructor with default absolute line search tolerances (see theother constructor
).PowellOptimizer(double lsRelativeTolerance, double lsAbsoluteTolerance)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected RealPointValuePair
doOptimize()
Perform the bulk of optimization algorithm.-
Methods inherited from class org.apache.commons.math.optimization.general.AbstractScalarDifferentiableOptimizer
computeObjectiveGradient, computeObjectiveValue, getConvergenceChecker, getEvaluations, getGradientEvaluations, getIterations, getMaxEvaluations, getMaxIterations, incrementIterationsCounter, optimize, setConvergenceChecker, setMaxEvaluations, setMaxIterations
-
-
-
-
Field Detail
-
DEFAULT_LS_RELATIVE_TOLERANCE
public static final double DEFAULT_LS_RELATIVE_TOLERANCE
Default relative tolerance for line search (1.0E-7).- See Also:
- Constant Field Values
-
DEFAULT_LS_ABSOLUTE_TOLERANCE
public static final double DEFAULT_LS_ABSOLUTE_TOLERANCE
Default absolute tolerance for line search (1.0E-11).- See Also:
- Constant Field Values
-
-
Constructor Detail
-
PowellOptimizer
public PowellOptimizer()
Constructor with default line search tolerances (see theother constructor
).
-
PowellOptimizer
public PowellOptimizer(double lsRelativeTolerance)
Constructor with default absolute line search tolerances (see theother constructor
).- Parameters:
lsRelativeTolerance
- Relative error tolerance for the line search algorithm (BrentOptimizer
).
-
PowellOptimizer
public PowellOptimizer(double lsRelativeTolerance, double lsAbsoluteTolerance)
- Parameters:
lsRelativeTolerance
- Relative error tolerance for the line search algorithm (BrentOptimizer
).lsAbsoluteTolerance
- Relative error tolerance for the line search algorithm (BrentOptimizer
).
-
-
Method Detail
-
doOptimize
protected RealPointValuePair doOptimize() throws FunctionEvaluationException, OptimizationException
Perform the bulk of optimization algorithm.- Specified by:
doOptimize
in classAbstractScalarDifferentiableOptimizer
- Returns:
- the point/value pair giving the optimal value for objective function
- Throws:
FunctionEvaluationException
- if the objective function throws one during the searchOptimizationException
- if the algorithm failed to converge
-
-