[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Re: Algorithmic Differentiation in Octave

From: John W. Eaton
Subject: Re: Re: Algorithmic Differentiation in Octave
Date: Tue, 24 Jan 2017 16:25:44 -0500
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Icedove/45.4.0

On 01/24/2017 01:44 PM, Brad Bell wrote:
On 01/24/2017 11:03 AM, Olaf Till wrote:
On Tue, Jan 24, 2017 at 08:35:09AM -0700, Brad Bell wrote:
I have created a link from Cppad
to Octave (and some other languages) through Swig. See
Also see the getting started example for Octave

Feel free to contact me if you have any questions about it.

I thought of implementing AD myself for Octave some time... The
natural concept seems to me to have classes whose objects
(representing vectors) you can give as arguments to a general scripted
function (restriction: function must only use operations which are
overloaded for the object) making this function return the

I think you are referring what is called tapeless forward mode AD; see

  Your concept seems to be different, and more complicated
for application -- it seems to involve creation of a separate
representation of the function code ('ay(0) = ax_0 * ax_1 * ax_2; af =
m_cppad.a_fun(ax, ay);' in your example)...?
Yes, the function is taped (recorded). Once it is taped, it can be
optimized, sparsity patterns can be computed, and derivatives, or all
orders, and that take advantage of sparsity, can be calculated. In
addition, the function can be evaluated (with C++ like speed) at
different points (provided that the operation sequence does not depend
on the independent variables):

For an important application (optimizing dynamic models which are
solved by providing sensitivity equations) we'd also need second
derivatives... And for efficiency, it would be good to be able to mark
some second derivatives which are not needed...

Are you aware of the (now unmaintained and probably obsolete) "ad" package from Octave Forge? An old version is still accessible here:

This may be the last released version:

Even though it is old and probably won't work out of the box with current versions of Octave, it might be worth looking at.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]