|
SuanShu, a Java numerical and statistical library | |||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectcom.numericalmethod.suanshu.optimization.unconstrained.NelderMead
public class NelderMead
The Nelder–Mead method is a nonlinear optimization technique, which is well-defined for twice differentiable and unimodal problems. However, the Nelder–Mead technique is only a heuristic, since it can converge to non-stationary points on problems that can be solved by alternative methods.
The Nelder–Mead method starts with a simplex, and then uses operations reflection, expansion, contraction, and reduction, to search for the minimum/maximum point.
The Nelder–Mead algorithm does not always converge even for smooth problems. In practice, however, the performance is generally good.
Note that one dimensional optimization by Nelder-Mead is unreliable.
| Nested Class Summary | |
|---|---|
static interface |
NelderMead.BuildSimplex
The Nelder–Mead algorithm requires an initial simplex to start the search. |
| Field Summary | |
|---|---|
double |
alpha
the reflection coefficient |
double |
gamma
the expansion coefficient |
double |
rho
the contraction coefficient |
double |
sigma
the shrink/reduction coefficient |
| Constructor Summary | |
|---|---|
NelderMead()
Construct a NelderMead instance to minimize an objective function with the default control parameters. |
|
NelderMead(double alpha,
double gamma,
double rho,
double sigma)
Construct a NelderMead instance to minimize/maximize f with the control parameters. |
|
| Method Summary | |
|---|---|
double |
minimum()
Get the minimum found. |
double[] |
search(double[] initial)
Perform a Nelder-Mead search from one initial guess. |
double[] |
search(int maxIterations,
double[]... simplex)
Perform a Nelder-Mead search from an initial simplex. |
double[] |
search(int maxIterations,
double[] initial)
Perform a Nelder-Mead search from one initial guess. |
Vector |
search(int maxIterations,
Vector... simplex)
Perform a Nelder-Mead search from an initial simplex. |
Vector |
search(int maxIterations,
Vector initial,
NelderMead.BuildSimplex simplex)
Perform a Nelder-Mead search from one initial guess. |
void |
solve(RealScalarFunction f,
double tol)
|
void |
solve(UnconstrainedProblem problem,
double tol)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public final double alpha
public final double gamma
public final double rho
public final double sigma
| Constructor Detail |
|---|
public NelderMead(double alpha,
double gamma,
double rho,
double sigma)
f with the control parameters.
alpha - the reflection coefficientgamma - the shrink/reduction coefficientrho - the contraction coefficientsigma - the shrink/reduction coefficientpublic NelderMead()
| Method Detail |
|---|
public void solve(UnconstrainedProblem problem,
double tol)
solve in interface UnconstrainedMinimizer
public void solve(RealScalarFunction f,
double tol)
solve in interface UnconstrainedMinimizerpublic double minimum()
MinimizerThis is especially useful for an objective function that takes a long time to compute.
minimum in interface Minimizer
public double[] search(int maxIterations,
double[]... simplex)
maxIterations - the maximum number of iterationssimplex - initial guesses for the optimizer.
The guess points should form a simplex.
public Vector search(int maxIterations,
Vector initial,
NelderMead.BuildSimplex simplex)
maxIterations - the maximum number of iterationsinitial - an initial guess of the optimizersimplex - specify the way to build a simplex from an initial point
public double[] search(int maxIterations,
double[] initial)
maxIterations - the maximum number of iterationsinitial - an initial guess of the optimizer
public double[] search(double[] initial)
initial - an initial guess of the optimizer
public Vector search(int maxIterations,
Vector... simplex)
search in interface MinimizermaxIterations - the maximum number of iterations, e.g., 500simplex - initial guesses for the optimizer;
The guess points should form a simplex.
|
SuanShu, a Java numerical and statistical library | |||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||