Hacker News new | ask | show | jobs
by dankohn1 3078 days ago
I remember being blown away as an undergrad that least squares (which I had learned first algrebraiclly) had such an obvious geometric meaning:

http://www.statisticshowto.com/wp-content/uploads/2014/11/le...

You need to square the values so that points that positives and negative differences (between the points and the trend regression line) don't cancel out.

1 comments

If you only needed to do that, you could just take the abs error (Even the 1-0 loss function, where every point that the regression hyperplane doesn't pass through contributes 1 to the error, fulfills this criterion).
I'm super new to statistics and math, so can you fill me in on why the error is squared rather than absolute valued? Is it because it's easier to take the derivative of, and therefore minimize analytically?