A doubt in C1_W2 Lecture

Dear Administrator,

Could you please guide me on this issue?

I have a question on this contour plot. Shouldn’t the parameter b represents the vertical axis while the vector of w represents the horizontal axis?

From what I have learned in the Week 1 Lecture, creating a contour plot for cost function J(w,b) will have a result of the parameter w represents the horizontal axis and the parameter b represents the vertical axis.

May I know the reason of w2 represents the vertical axis?

Thank you.

The picture is taken from this learning material:

Supervised Machine Learning: Regression and Classification

  • Gradient descent in practice
    • Video: Feature scaling part 1
      • Time-> 4:31/6:34

We can plot J, w, and b but it will be 3D. For simplicity, Prof. Andrew drew a 2D plot.

Dear Mr Saifkhanengr,

According to the contour plot, there are J, w1, and w2 but b is missing.

May I know the reason of w2 represents the vertical axis but not b?

Thank you.

‘b’ is not important for the purposes of this 2D plot that shows the contour plots.
‘b’ is a constant (a bias) that is added to every example.

What’s more significant is the impact of having two features.

Thank you so much Mr TMosh for your guidance.