What is a loss function? How can we relate the slope of Linear Regression with Sum of Squared Errors?
-
1$\begingroup$ Those are three questions. Could you bring it back to a single one? $\endgroup$– Sextus EmpiricusCommented Mar 14, 2019 at 13:33
-
$\begingroup$ stats.stackexchange.com/search?q=what+is+a+loss+function $\endgroup$– Sextus EmpiricusCommented Mar 14, 2019 at 13:34
-
$\begingroup$ Have you tried googling what's a loss function? Fot the SSE, check this. $\endgroup$– Lucas FariasCommented Mar 14, 2019 at 13:34
-
$\begingroup$ stats.stackexchange.com/search?q=why+sum+of+squares $\endgroup$– Sextus EmpiricusCommented Mar 14, 2019 at 13:34
-
$\begingroup$ I gave a similar answer here: datascience.stackexchange.com/a/46823/10372 $\endgroup$– gentedCommented Mar 14, 2019 at 13:47
1 Answer
A loss function is a (real-valued) function which typically takes a data set and a certain fitted model.
It is typically used as a measurement to determine goodness-of-fit of the model. Multiple techniques are based on finding the model that minimizes such loss function.
SSE is used in linear regression because it directly relates to the portion of the variance of outcome $Y$ that is not explained (cannot be contributed) to the difference is the values of (the) predictor(s) $X$. It is a measure of 'predicability' of the $X$'s for the value of $Y$.
The SSE directly relates to the slope of a linear regression model because it is the sum of the squared deviations of a given $(X,Y)$ from $(X,\hat{Y})$ where $\hat{Y}$ is the predicted value based on the model and the given $X$.
-
$\begingroup$ Your answer would be better if you were explicit about how SSE "relates" to unexplained variance and the slope of the regression line. $\endgroup$ Commented Mar 14, 2019 at 14:46
-
$\begingroup$ This answer seems opaque and lacking in historical context, hence my downvote. $\endgroup$ Commented Mar 14, 2019 at 15:13