On Mar 8, 2011, at 2:05 PM, [email protected] wrote:
In fact, for realistic parameter sets, computing the gradients (with
some automatic differentiation data type) consumes about 90% of the
total runtime of my program. Evaluating the function without differentiation (data type double) is quite cheap.

Peter, this probably means that your automatic differentiation program is poor for this kind of problem.

There is a theorem that you can always compute the gradient of f(x) (any function from R^n to R) with about as many additional operations as are required to compute f(x) **once**. The technique for doing so is called an "adjoint method", or "reverse accumulation".

So you want an AD program that advertises "reverse mode" differentiation or something similar.

In contrast, AD programs that use "forward mode" or "forward accumulation" differentiation are poor for differentiating multi- variate functions (R^n to R), since they have cost that grows proportional to n. (Forward accumulation is good for differentiating functions from R to R^m.)

Steven

_______________________________________________
NLopt-discuss mailing list
[email protected]
http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/nlopt-discuss

Reply via email to