Week 2, optional lab 3

hi! in lab 3 of week 2 “C1_W2_Lab03_Feature_Scaling_and_Learning_Rate_Soln”
i have some difficulty understanding somthing about the results we get.
when we had finished normelizing our fetures, and now we want to plot our predictions versus the target values, i find it very weird that we dont get a linear result of some kind, becaus to find the predictions we use a liner formula…

can you help me?

Hello @iyarden72, I think you were expecting to see the orange dots in each plot to form a straight line. If so, consider this, let’s say we used only the feature “size” in the model, and in such case, the orange dots should have formed a straight line because the model would simply be

Price = w1 * size + b

Now we add bedrooms, and the model becomes

Price = w1 * size + w2 * bedrooms + b

Now we make the Price vs size plot, with only the w1 * size + b term, it will be a straight line, but because now we have to add the w2 * bedrooms term as well, the final Price gets shifted upwards or downwards, and therefore it is no longer a straight line.

i understand now what my confution was

1 Like