for the function compute gradient, I cant get my head on what the **z_wb** is, and what the for loop inside a loop is trying to achieve.

I suspect the z_wb is the **z = w*X +b**

I feel like i am missing something and I dont know what. The hint provided is not helping as well.

TMosh
2
Yes, z_wb is w*X + b. Then you get f_wb by computing the sigmoid of z_wb.

The hints in the code assume that you will compute z_wb using a for-loop to iterate through all of the features in the ‘x’ and ‘w’ vectors.

If you want to compute f_wb using a matrix product, and not iterate through the features, that’s totally fine also.

1 Like

thanks, i struggle with iterations. I am more comfortable with matrices

1 Like