augmented_lagrangian_method on purely computational / numeric functions?
Subject: augmented_lagrangian_method on purely computational / numeric functions?
From: Robert Dodier
Date: Mon, 22 Jan 2007 00:15:11 -0700
Daniel,
Not sure if this exactly addresses your problem, but I've modified
lbfgs and augmented_lagrangian_method to allow the caller to
specify the gradient, so that it is not constructed via diff.
I didn't attempt to allow for a numerically approximated gradient
(a secant or other approximation). Although that probably works
more or less, I'm pretty sure in that case methods devised
especially for that case might be superior.
Anyway the new functions are called as
lbfgs ([FOM, [g1, g2, g3, ...]], ...)
augmented_lagrangian_method ([FOM, [g1, g2, g3, ...]], ...)
where FOM is the figure of merit expression and g1, g2, g3, ...
are components of the gradient of FOM, and the other arguments
are just as before.
FOM and gradient can't be function names or lambda expressions --
probably just laziness on my part -- so if FOM and gradient are
computed by some functions F and G1, G2, G3 (e.g.) you would
have to write it like this (note the quote mark):
augmented_lagrangian_method ( ' [F(x, y, z), [G1(x, y, z), G2(x, y,
z), G3(x, y, z)]], ...)
You can get the current code from cvs (should appear in a few hours).
You'll need src/plot.lisp (new code in COERCE-FLOAT-FUN),
share/lbfgs/maxima-lbfgs.lisp, and share/contrib/augmented_lagrangian.mac.
Have fun and let me know how it goes --
Robert