Skip to content
Prev 74918 / 398502 Next

optim

On Thu, 4 Aug 2005, nwew wrote:

            
They are available to you as part of the R API at C level.
That is an unusual situation.
You can of course write your function to cache the work and check if the
parameter value is unchanged from the last call.  Then if the optimizer 
calls for the gradient after the function value in the same place (and 
most methods will) you can just do the additional work for the gradient.

That is what nnet does, at C level.