Optimization question.
- To: mathgroup at smc.vnet.net
- Subject: [mg98164] Optimization question.
- From: Gregory Duncan <gmduncan at gmail.com>
- Date: Wed, 1 Apr 2009 05:55:30 -0500 (EST)
- Reply-to: gmduncan at econ.berkeley.edu
I have a very complicated objective function calculated using a recursion. It is straightforward to compute the gradient as the function is computed. How to I tell Mathematica that when it needs the gradient, it must calculate the objective first? Alternatively, is there a way to tell whether the objective has "just" been evaluated and tell Mathematica to use one program for the gradient if the objective has just been called with the same parameter values and another if it was called in a previous iteration or sub iteration, e.g. with different parameters. Maybe it is in the documentation somewhere but I could not find it. Greg Duncan