Open cswiercz opened 8 years ago
The functions that I will use to test your code will be relatively simple. Polynomial and trigonometric functions are good since you can construct all sorts of cases that would be good tests of your code.
A decent, but not sufficient test would be a convex function (e.g. f = lambda x: x**2
) This function has a global minimum and is convex, implying that gradient descent will "always work".
A more robust test would be to use a function that has several local minima as well as several local maxima. In this case, what might happen if our initial guess was at a maxima?
Thanks!
In the example for the test provided for problem 2 there are some variables like x0, x1 and x1_actual. Are these variable names we have to respect in order for our code to pass the instructors test?
In the example for the test provided for problem 2 there are some variables like x0, x1 and x1_actual. Are these variable names we have to respect in order for our code to pass the instructors test?
Not at all. The actual test suite I will use on your code is a completely separate script that I will inject into your project. You can use whatever variable names you want for your own tests. The tests given to you only serve as an example of what a test may look like.
Great! Thanks
A student asked: