uwhpsc-2016 / homework1

Homework #1
1 stars 1 forks source link

Exercise #2 Providing the Derivative #19

Open jhyearsley opened 8 years ago

jhyearsley commented 8 years ago

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.

alyfarahat commented 8 years ago

Bullet 1. of Exercise 2 statement explicitly mentions that the derivative function f' is an input parameter of gradient_step.

cswiercz commented 8 years ago

@alyfarahat is correct. The derivative should be explicitly given.

jhyearsley commented 8 years ago

Okay thanks, I misread the question as return the derivative, not realizing the derivative was already given...

mollyzyy787 commented 8 years ago

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?

mvelegar commented 8 years ago

@mollyzyy787 yes, df is defined as a function. You are correct about evaluating df for each xk.