|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.lgc.wsh.opt.QuadraticSolver
public class QuadraticSolver
Minimize a simple quadratic objective function. Finds the x that minimizes the quadratic function 0.5 x'Hx + b'x . Solves Hx + b = 0 for x (the Normal Equations of a least-squares problem) b is the gradient for x=0, and H is the hessian. The algorithm is a conjugate gradient. A is an approximate inverse Hessian, making AH more diagonal and improving convergence. A may also include a model-dependent conditioning to converge earlier on eigenfunction of most importance. The algorithm assumes that the application of H dominates the cost.
x = p = u = 0;
beta = 0;
g = b;
a = A g;
q = H a;
do {
p = -a + beta p
u = Hp = -q + beta u
scalar = -p'g/p'u
x = x + scalar p
if (done) return x
g = H x + b = g + scalar u
a = A g
q = H a
beta = p'H A g / p'H p = p'q/p'u
}
Also contains a solver for a least-squares inverse of a linear
transform, using QuadraticTransform as a wrapper.
| Constructor Summary | |
|---|---|
QuadraticSolver(Quadratic quadratic)
Implement the Quadratic interface and pass to this constructor. |
|
| Method Summary | |
|---|---|
Vect |
solve(int numberIterations,
Monitor monitor)
Return a new solution after the number of conjugate gradient iterations. |
static Vect |
solve(VectConst data,
VectConst referenceModel,
LinearTransform linearTransform,
boolean dampOnlyPerturbation,
int conjugateGradIterations,
Monitor monitor)
Solve quadratic objective function for linear transform. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public QuadraticSolver(Quadratic quadratic)
quadratic - Defines the Hessian quadratic term.| Method Detail |
|---|
public Vect solve(int numberIterations,
Monitor monitor)
numberIterations - is the number of iterations to perform.monitor - If non-null, then track all progress.
public static Vect solve(VectConst data,
VectConst referenceModel,
LinearTransform linearTransform,
boolean dampOnlyPerturbation,
int conjugateGradIterations,
Monitor monitor)
[F(m+x)-data]'N[F(m+x)-data] + (m+x)'M(m+x)
if dampOnlyPerturbation is true and
[F(m+x)-data]'N[F(m+x)-data] + (x)'M(x)
if dampOnlyPerturbation is false.
data - The data to be fit.referenceModel - Initialize with this model.linearTransform - Describes the linear transform.dampOnlyPerturbation - If true then, only damp perturbations
to reference model. If false, then damp the reference model plus
the perturbation.conjugateGradIterations - The specified number of conjugate
gradient iterations.monitor - Report progress here, if non-null.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||