Open jhyearsley opened 8 years ago
Bullet 1. of Exercise 2 statement explicitly mentions that the derivative function f' is an input parameter of gradient_step
.
@alyfarahat is correct. The derivative should be explicitly given.
Okay thanks, I misread the question as return the derivative, not realizing the derivative was already given...
A follow up question, is the derivative given as a function, or as a value in the argument? if it is given as a function, we should put df evaluated at xk each time in the equation, right?
@mollyzyy787 yes, df is defined as a function. You are correct about evaluating df for each xk.
The gradient_step function asks us to return the derivative f' of the function we are trying to minimize. It is not clear what derivative means in this context. I assume we are interested in the finite difference of the function we are investigating, but even if that is the case the problem set does not specify the approximation order (though I assume if this is the case second order will do). In any case it would be helpful for these kind of issues to be clarified on the homework sheet for future problem sets.