MATLAB Answers

Looking for an Automatic differentiation trick

1 view (last 30 days)
carlos lopez
carlos lopez on 10 Sep 2020
I have a minimization problem yout=f(x). I am using some operator overloading routine to compute the Jacobian and Hessian, and everything works fine in small cases.
However, when the length of vector x increases I have issues with memory and computing time (no surprise!). I noticed that, in this particular function, most elements of vector x have no impact on yout, and I were able to identify those which are relevant. For the sake of this question, let's assume that the first 100 elements of x are relevant for the minimization.
I found no way to teach the AD library to ignore some variables and keep working on others. The "limitation" is not particular of this toolbox (INTLAB), but in the operator overload mechanism. I The question is: can anyone suggest a trick to circumvent this limitation? My best results were to compute the derivatives as usual, and afterwards extract from the large Jacobian and Hessian those rows and columns of interest. The minimization routine will operate in the small size problem, but the overhead is still in the computation of a large Jacobian and Hessian.

Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!