Programming Assignment - Week 1 -Exercise 3

Hi, Can anyone explain exercise 3 of the programming assignment in a little bit detail? Thank You

Hello, @Syed_Hamza_Tehseen
I think it’s good to mention which concept you need some clarity/on the specific error you might be having. That way you will get help much more quicker…

2 Likes

Same issue for me also

Dear @Kumaraswamy_Minuku @Syed_Hamza_Tehseen So, Course 2: Calculus. Programming assignment for Week 1 - Exercise 3:

  1. The general idea of the assignment is to load some data froma CSV file and then create a cost function L(w) and find the minimal value of that function.
  2. In exercise 1 you have load the data and plot it to visually analyze it.
  3. In exercise 2 you have created the cost function
  4. In exercise 3 you will:
    a. Create an array that will contains the numbers from 0 to 1 -including the number 1- (1001 values)
    b. Create a function L_of_omega_array that will receive the previous array as parameters and it will create another array filled with zeros with the same size of the array just received. Then, it will loop over the array and for each value in the array it will pass the value to the function L_of_omega defined in Exercise 2 and finally with the result obtained with the function it will replace the value in the array filled with zeros. So, at the end where you used to have zeros you will end up having the result of the Loss functions calculated for the numbers from 0 to 1.
    c. Finally you will find the minimum value (index and value) in the array you just filled (instead of the zeros)

I think it will be easier if you guys ask the specific line where you are not figuring out what to do so I can explain. I hope this helps.

Forgive my newness to Python:

What value should I set?

Thank you so very much.

L = L_of_omega(omega_array[i]) instead of your actual line