|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectgov.sandia.cognition.util.AbstractCloneableSerializable
gov.sandia.cognition.algorithm.AbstractIterativeAlgorithm
gov.sandia.cognition.algorithm.AbstractAnytimeAlgorithm<ResultType>
gov.sandia.cognition.learning.algorithm.AbstractAnytimeBatchLearner<EvaluatorType,InputOutputPair<InputType,OutputType>>
gov.sandia.cognition.learning.algorithm.minimization.AbstractAnytimeFunctionMinimizer<Vector,Double,Evaluator<? super Vector,Double>>
gov.sandia.cognition.learning.algorithm.minimization.FunctionMinimizerDirectionSetPowell
@PublicationReferences(references={@PublicationReference(author="R. Fletcher",title="Practical Methods of Optimization, Second Edition",type=Book,year=1987,pages={87,90},notes="Section 4.2"),@PublicationReference(author={"William H. Press","Saul A. Teukolsky","William T. Vetterling","Brian P. Flannery"},title="Numerical Recipes in C, Second Edition",type=Book,year=1992,pages={417,418},notes="Section 10.5",url="http://www.nrbook.com/a/bookcpdf.php")}) public class FunctionMinimizerDirectionSetPowell
Implementation of the derivative-free unconstrained nonlinear direction-set
minimization algorithm called "Powell's Method" by Numerical Recipes.
The method was originally known as Smith's Direction-Set Method, to which
Powell made an ingenious improvement. Powell's Method was later improved
upon by Brent. This algorithm creates a basis set of search directions and
repeatedly searches along each direction until a local minimum is found
using only function evaluations, that is, no gradient information is needed.
This algorithm is amazingly good at finding a minimum, and is my method of
choice for derivative-free minimization. However, be sure to check the
performance this algorithm's cousin, the Nelder-Mead downhill simplex
(FunctionMinimizerNelderMead) before deciding on a derivative-free
minimization algorithm.
That being said, it is sometimes more effective to use approximated
gradients and algorithms like BFGS (FunctionMinimizerBFGS) than
derivative-free minimization algorithms. Thus, I would try them both.
Field Summary | |
---|---|
static LineMinimizer<?> |
DEFAULT_LINE_MINIMIZER
Default line minimization algorithm, LineMinimizerDerivativeFree |
static int |
DEFAULT_MAX_ITERATIONS
Default maximum number of iterations before stopping, 1000 |
static double |
DEFAULT_TOLERANCE
Default tolerance, 1.0E-5 |
Fields inherited from class gov.sandia.cognition.learning.algorithm.minimization.AbstractAnytimeFunctionMinimizer |
---|
initialGuess, result, tolerance |
Fields inherited from class gov.sandia.cognition.learning.algorithm.AbstractAnytimeBatchLearner |
---|
data, keepGoing |
Fields inherited from class gov.sandia.cognition.algorithm.AbstractAnytimeAlgorithm |
---|
maxIterations |
Fields inherited from class gov.sandia.cognition.algorithm.AbstractIterativeAlgorithm |
---|
DEFAULT_ITERATION, iteration |
Constructor Summary | |
---|---|
FunctionMinimizerDirectionSetPowell()
Default constructor |
|
FunctionMinimizerDirectionSetPowell(LineMinimizer<?> lineMinimizer)
Creates a new instance of FunctionMinimizerDirectionSetPowell |
|
FunctionMinimizerDirectionSetPowell(LineMinimizer<?> lineMinimizer,
Vector initialGuess,
double tolerance,
int maxIterations)
Creates a new instance of FunctionMinimizerDirectionSetPowell |
Method Summary | |
---|---|
protected void |
cleanupAlgorithm()
Called to clean up the learning algorithm's state after learning has finished. |
LineMinimizer<?> |
getLineMinimizer()
Getter for lineMinimizer |
protected boolean |
initializeAlgorithm()
Called to initialize the learning algorithm's state based on the data that is stored in the data field. |
void |
setLineMinimizer(LineMinimizer<?> lineMinimizer)
Setter for lineMinimizer |
protected boolean |
step()
Called to take a single step of the learning algorithm. |
Methods inherited from class gov.sandia.cognition.learning.algorithm.minimization.AbstractAnytimeFunctionMinimizer |
---|
getInitialGuess, getResult, getTolerance, setInitialGuess, setResult, setTolerance |
Methods inherited from class gov.sandia.cognition.learning.algorithm.AbstractAnytimeBatchLearner |
---|
clone, getData, getKeepGoing, learn, setData, setKeepGoing, stop |
Methods inherited from class gov.sandia.cognition.algorithm.AbstractAnytimeAlgorithm |
---|
getMaxIterations, isResultValid, setMaxIterations |
Methods inherited from class gov.sandia.cognition.algorithm.AbstractIterativeAlgorithm |
---|
addIterativeAlgorithmListener, fireAlgorithmEnded, fireAlgorithmStarted, fireStepEnded, fireStepStarted, getIteration, getListeners, removeIterativeAlgorithmListener, setIteration, setListeners |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface gov.sandia.cognition.learning.algorithm.minimization.FunctionMinimizer |
---|
learn |
Methods inherited from interface gov.sandia.cognition.util.CloneableSerializable |
---|
clone |
Methods inherited from interface gov.sandia.cognition.algorithm.AnytimeAlgorithm |
---|
getMaxIterations, setMaxIterations |
Methods inherited from interface gov.sandia.cognition.algorithm.IterativeAlgorithm |
---|
addIterativeAlgorithmListener, getIteration, removeIterativeAlgorithmListener |
Methods inherited from interface gov.sandia.cognition.algorithm.StoppableAlgorithm |
---|
isResultValid, stop |
Field Detail |
---|
public static final int DEFAULT_MAX_ITERATIONS
public static final double DEFAULT_TOLERANCE
public static final LineMinimizer<?> DEFAULT_LINE_MINIMIZER
Constructor Detail |
---|
public FunctionMinimizerDirectionSetPowell()
public FunctionMinimizerDirectionSetPowell(LineMinimizer<?> lineMinimizer)
lineMinimizer
- Work-horse algorithm that minimizes the function along a directionpublic FunctionMinimizerDirectionSetPowell(LineMinimizer<?> lineMinimizer, Vector initialGuess, double tolerance, int maxIterations)
initialGuess
- Initial guess about the minimum of the methodtolerance
- Tolerance of the minimization algorithm, must be >= 0.0, typically ~1e-10lineMinimizer
- Work-horse algorithm that minimizes the function along a directionmaxIterations
- Maximum number of iterations, must be >0, typically ~100Method Detail |
---|
protected boolean initializeAlgorithm()
AbstractAnytimeBatchLearner
initializeAlgorithm
in class AbstractAnytimeBatchLearner<Evaluator<? super Vector,Double>,InputOutputPair<Vector,Double>>
protected boolean step()
AbstractAnytimeBatchLearner
step
in class AbstractAnytimeBatchLearner<Evaluator<? super Vector,Double>,InputOutputPair<Vector,Double>>
protected void cleanupAlgorithm()
AbstractAnytimeBatchLearner
cleanupAlgorithm
in class AbstractAnytimeBatchLearner<Evaluator<? super Vector,Double>,InputOutputPair<Vector,Double>>
public LineMinimizer<?> getLineMinimizer()
public void setLineMinimizer(LineMinimizer<?> lineMinimizer)
lineMinimizer
- Work-horse algorithm that minimizes the function along a direction
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |