Vectorized Compute Gradient for Multiple Variable Linear Regression

Welcome to the community!

Please do not post your code on the forum. Because this is a graded assignment, it’s not allowed by the community guidelines. I have edited your post to remove the code.

Thanks for warning me.
My intension was vectorization of that function.
Can you please delete this topic @TMosh

Hello @alperenunlu,

Does your dj_dw has a shape of (n, )? It seems not summing up over samples. You have used np.mean in dj_db to sum something up but I don’t see any action of summing things in dj_dw.

You are posting this topic in C1 W2. Which lab is it?

Cheers,
Raymond