|
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.steepestdescent.SteepestDescent
public abstract class SteepestDescent
A steepest descent algorithm finds the minimum by moving along the negative of the steepest g direction.
In each iteration, we compute a direction, e.g., dk = −g as in the first order approximation.
We search along this direction for an improved minimizer by
analytically computing αk that minimizes
f(xk + αk * dk).
The minimizer xk+1 = xk + αk * dk is updated.
This procedure is repeated until |αk * dk| becomes sufficiently small, hence convergence.
| Nested Class Summary | |
|---|---|
class |
SteepestDescent.LineSearch
A steepest-descent method, in each iteration, searches along a direction to find the next best minimizer along a direction. |
| Field Summary | |
|---|---|
protected RealScalarFunction |
f
the function to be minimized |
protected RealVectorFunction |
g
g: the gradient of f |
protected double |
tol
the convergence tolerance |
| Constructor Summary | |
|---|---|
SteepestDescent()
|
|
| Method Summary | |
|---|---|
protected abstract SteepestDescent.LineSearch |
getLineSearch()
|
double |
minimum()
Get the minimum found. |
Vector |
search(int maxIterations,
Vector... initials)
Search for a minimizer from an initial guess until the increment is small enough, hence convergence. |
void |
solve(RealScalarFunction f,
double tol)
|
void |
solve(RealScalarFunction f,
RealVectorFunction g,
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 |
|---|
protected RealScalarFunction f
protected RealVectorFunction g
g: the gradient of f
protected double tol
| Constructor Detail |
|---|
public SteepestDescent()
| Method Detail |
|---|
protected abstract SteepestDescent.LineSearch getLineSearch()
public void solve(RealScalarFunction f,
RealVectorFunction g,
double tol)
public void solve(RealScalarFunction f,
double tol)
solve in interface UnconstrainedMinimizer
public void solve(UnconstrainedProblem problem,
double tol)
solve in interface UnconstrainedMinimizer
public Vector search(int maxIterations,
Vector... initials)
search in interface MinimizermaxIterations - the maximum number of iterationsinitials - an initial guess of minimizer
public double minimum()
MinimizerThis is especially useful for an objective function that takes a long time to compute.
minimum in interface Minimizer
|
SuanShu, a Java numerical and statistical library | |||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||