org.apache.commons.math3.optimization.direct
Class PowellOptimizer

java.lang.Object
  extended by org.apache.commons.math3.optimization.direct.BaseAbstractMultivariateOptimizer<MultivariateFunction>
      extended by org.apache.commons.math3.optimization.direct.PowellOptimizer
All Implemented Interfaces:
BaseMultivariateOptimizer<MultivariateFunction>, BaseOptimizer<PointValuePair>, MultivariateOptimizer

Deprecated. As of 3.1 (to be removed in 4.0).

@Deprecated
public class PowellOptimizer
extends BaseAbstractMultivariateOptimizer<MultivariateFunction>
implements MultivariateOptimizer

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.
The internal line search optimizer is a BrentOptimizer with a convergence checker set to SimpleUnivariateValueChecker.

Since:
2.2
Version:
$Id: PowellOptimizer.java 1422313 2012-12-15 18:53:41Z psteitz $

Nested Class Summary
private  class PowellOptimizer.LineSearch
          Deprecated. Class for finding the minimum of the objective function along a given direction.
 
Field Summary
private  double absoluteThreshold
          Deprecated. Absolute threshold.
private  PowellOptimizer.LineSearch line
          Deprecated. Line search.
private static double MIN_RELATIVE_TOLERANCE
          Deprecated. Minimum relative tolerance.
private  double relativeThreshold
          Deprecated. Relative threshold.
 
Fields inherited from class org.apache.commons.math3.optimization.direct.BaseAbstractMultivariateOptimizer
evaluations
 
Constructor Summary
PowellOptimizer(double rel, double abs)
          Deprecated. The parameters control the default convergence checking procedure.
PowellOptimizer(double rel, double abs, ConvergenceChecker<PointValuePair> checker)
          Deprecated. 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)
          Deprecated. Builds an instance with the default convergence checking procedure.
PowellOptimizer(double rel, double abs, double lineRel, double lineAbs, ConvergenceChecker<PointValuePair> checker)
          Deprecated. 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()
          Deprecated. Perform the bulk of the optimization algorithm.
private  double[][] newPointAndDirection(double[] p, double[] d, double optimum)
          Deprecated. 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, getLowerBound, getMaxEvaluations, getStartPoint, getUpperBound, optimize, optimize, optimizeInternal, optimizeInternal
 
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

MIN_RELATIVE_TOLERANCE

private static final double MIN_RELATIVE_TOLERANCE
Deprecated. 
Minimum relative tolerance.


relativeThreshold

private final double relativeThreshold
Deprecated. 
Relative threshold.


absoluteThreshold

private final double absoluteThreshold
Deprecated. 
Absolute threshold.


line

private final PowellOptimizer.LineSearch line
Deprecated. 
Line search.

Constructor Detail

PowellOptimizer

public PowellOptimizer(double rel,
                       double abs,
                       ConvergenceChecker<PointValuePair> checker)
Deprecated. 
This constructor allows to specify a user-defined convergence checker, in addition to the parameters that control the default convergence checking procedure.
The internal line search tolerances are set to the square-root of their corresponding value in the multivariate optimizer.

Parameters:
rel - Relative threshold.
abs - Absolute threshold.
checker - Convergence checker.
Throws:
NotStrictlyPositiveException - if abs <= 0.
NumberIsTooSmallException - if rel < 2 * Math.ulp(1d).

PowellOptimizer

public PowellOptimizer(double rel,
                       double abs,
                       double lineRel,
                       double lineAbs,
                       ConvergenceChecker<PointValuePair> checker)
Deprecated. 
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.

Parameters:
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.
Throws:
NotStrictlyPositiveException - if abs <= 0.
NumberIsTooSmallException - if rel < 2 * Math.ulp(1d).

PowellOptimizer

public PowellOptimizer(double rel,
                       double abs)
Deprecated. 
The parameters control the default convergence checking procedure.
The internal line search tolerances are set to the square-root of their corresponding value in the multivariate optimizer.

Parameters:
rel - Relative threshold.
abs - Absolute threshold.
Throws:
NotStrictlyPositiveException - if abs <= 0.
NumberIsTooSmallException - if rel < 2 * Math.ulp(1d).

PowellOptimizer

public PowellOptimizer(double rel,
                       double abs,
                       double lineRel,
                       double lineAbs)
Deprecated. 
Builds an instance with the default convergence checking procedure.

Parameters:
rel - Relative threshold.
abs - Absolute threshold.
lineRel - Relative threshold for the internal line search optimizer.
lineAbs - Absolute threshold for the internal line search optimizer.
Throws:
NotStrictlyPositiveException - if abs <= 0.
NumberIsTooSmallException - if rel < 2 * Math.ulp(1d).
Since:
3.1
Method Detail

doOptimize

protected PointValuePair doOptimize()
Deprecated. 
Perform the bulk of the optimization algorithm.

Specified by:
doOptimize in class BaseAbstractMultivariateOptimizer<MultivariateFunction>
Returns:
the point/value pair giving the optimal value of the objective function.

newPointAndDirection

private double[][] newPointAndDirection(double[] p,
                                        double[] d,
                                        double optimum)
Deprecated. 
Compute a new point (in the original space) and a new direction vector, resulting from the line search.

Parameters:
p - Point used in the line search.
d - Direction used in the line search.
optimum - Optimum found by the line search.
Returns:
a 2-element array containing the new point (at index 0) and the new direction (at index 1).


Copyright (c) 2003-2013 Apache Software Foundation