Question on the Cost Function - Week 1 Optional Lab: Cost Function

Hello, in the contour plot, didn’t the teacher said that each oval circle shows a set of points that takes on the same value of J(w,b), meaning, each elipses will have the same height (cost)

In the optional lab, while clicking on 2 different points on the same circle, I get slightly different cost though:

Can anyone help me understand this?

Thank you!

Hello @yhuai_lin

Rest assured that the points on the same ellipse have the same Cost. However, keep in mind that the entire plot, including the white space in between the ellipses, corresponds to various Cost values - So, the challenge is to click on 2 different places on the same ellipse, with the blue dot exactly middling the ellipse line.

I would suggest to zoom into the contour plot to the extent that you can only see 1 ellipse on the entire plot and then try to center the blue dot on different parts of that ellipse - Note:- If the Blue dot is a little off-center, the Cost Value will be different.