[R] Automatic differentiation in R

Hans W. Borchers hwborchers at googlemail.com
Thu Jul 23 23:02:20 CEST 2009


Having given a lecture on "Numerical Derivatives" just a short time ago, I
would like to mention the following:

Many functions, especially in engineering, are not available as formulas
built simply from arithmetical operators and elementary functions.  They are
provided as intricate procedures, as results from simulation runs, or as
return values from optimization routines.

In all these cases, symbolic differentiation is not a possibility at all. 
Still, for further processing there will be a need to differentiate these
functions.

As I understand the literature, Automated Differentiations (AD) is mostly
meant for these kinds of applications(*).  Another push for AD came from
increased interest in the "complex-step derivative approximation" where
first an analytic continuation -- often nontrivial -- has to be established,
before the derivation can be computed.

It may be different in statistical tasks.  But a general automated
differentiation in R may have to take these kinds of applications into
account.

Regards
Hans Werner

(*) See the "Community Portal for AD" <www.autodiff.org> and the definition
of automated differentiation there as an example.


nashjc wrote:
> 
> [...]
> 
> The clear issue in my mind is that users who need gradients/Jacobians 
> for R want to be able to send a function X to some process that will 
> return another function gradX or JacX that computes analytic 
> derivatives. This has to be "easy", which implies a very simple command 
> or GUI interface. I am pretty certain the users have almost no interest 
> in the mechanism, as long as it works. Currently, most use numerical 
> derivatives, not realizing the very large time penalty and quite large 
> loss in accuracy that can compromise some optimization and differential 
> equation codes. I'll try to prepare a few examples to illustrate this 
> and post them somewhere in the next few weeks. Time, as always, ...
> 
> However, the topic does appear to be on the table.
> 
> JN
> 

-- 
View this message in context: http://www.nabble.com/Automatic-differentiation-in-R-tp24602805p24634481.html
Sent from the R help mailing list archive at Nabble.com.




More information about the R-help mailing list