News for hackers. Stuff that matters.
Re:Linear regression by hand by dankohn1 on Saturday January 20, 2018 @12:15PM (#16194143)
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.

Re:Linear regression by hand by pliny on Saturday January 20, 2018 @01:49PM (#16194727)
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).
Re:Linear regression by hand by eat_veggies on Saturday January 20, 2018 @09:26PM (#16196566)
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?