Query Regarding Error Representation in Week 1 Cost Function

Hi,

I am currently taking the Supervised Machine Learning: Regression and Classification course on Coursera. In the Week 1 content, the cost function and its derivatives are explained using the error term as (y^−y)2 [predicted y minus y whole squared]. However, in my textbook and most online references, the error is represented as (y−y^)2.

Could you please clarify why the course uses (y^−y)2 instead of (y−y^)2, and whether there is any difference between the two?

Thank you.

This is basically just a notational convention. From a mathematical perspective, of course, the results are equal:

(\hat{y} - y)^2 = ((-1)(y - \hat{y}))^2 = (-1)^2 * (y - \hat{y})^2 = (y - \hat{y})^2

2 Likes

Ah, thanks. I got confused by what the isolated ^ meant in the OP.

thank you for clarifying.