chain_rules
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| chain_rules [2025/08/22 04:04] – hkimscil | chain_rules [2026/03/10 22:11] (current) – [e.g.] hkimscil | ||
|---|---|---|---|
| Line 31: | Line 31: | ||
| see [[:gradient descent]] | see [[:gradient descent]] | ||
| \begin{eqnarray*} | \begin{eqnarray*} | ||
| - | \hat{y} & = & a + b x \\ | + | \because{ \;\; } \text{predicted value } \; \hat{y} & = & a + b x \\ |
| - | \text{residual} & = & y - \hat{y} \\ | + | \text{and }\; |
| - | & = & [y - (a + b x)] \\ | + | \therefore{} \;\; \text{residual}^2 |
| + | \therefore{} \sum{\text{residual}^2} & = & \sum{(y - (a + b x))^2} \\ | ||
| + | & = & \text{SSE, | ||
| + | \\ | ||
| + | \dfrac{\text{dSSE}}{\text{da}} & = & \\ | ||
| \end{eqnarray*} | \end{eqnarray*} | ||
| - | y.hat = a + b * x | + | intercept, a 에 대한 SSR의 미분은 |
| - | a = intercept | + | \begin{eqnarray*} |
| - | residuals | + | \widehat{y} & = & a + b * x \\ |
| - | d.sum.of.residuals^2 / d.intercept | + | \text{a} & = & \text{intercept} \\ |
| - | = d.sum.of.residuals^2 / d.sum.of.residuals | + | \text{residual} & = & (y - \widehat{y}) \\ |
| - | = (2 * residual) * d(y - y.hat)/d.intercept | + | \text{SSR} & = & \sum |
| - | = (2 * residual) * | + | \dfrac{\text{d.SSR}}{\text{d.a}} & = & |
| - | = (2 * residual) * d(y - a - bx) | + | \dfrac{\text{d.SSR}}{\text{d.Res}} * \dfrac{\text{d.Res}}{\text{d.a}} \\ |
| - | = (2 * residual) * -1 | + | & = & (2 * \text{residual}) * \dfrac{ \text{d.Res}} {\text{d.intercept}} \\ |
| - | = -2 * residual | + | & = & (2 * \text{residual}) * \dfrac{y - (a + b * x)} {\text{d.intercept}} \\ |
| + | & = & 2 * \text{residual} * -1 \\ | ||
| + | & = & -2 * \text{residual} \\ | ||
| + | & = & -2 * (y - (a + b * x)) \\ | ||
| + | & = & -2 * (y - \widehat{y}) \\ | ||
| + | \end{eqnarray*} | ||
| + | |||
| + | slope, b 에 대한 SSR의 미분은 | ||
| + | \begin{eqnarray*} | ||
| + | \widehat{y} & = & a + b * x \\ | ||
| + | \text{b} & = & \text{slope} \\ | ||
| + | \text{residual} & = & (y - \widehat{y}) \\ | ||
| + | \text{SSR} & = & \sum {\text{residual}^2} = \sum{(y - (a + b x))^2} \\ | ||
| + | \dfrac{\text{d.SSR}}{\text{d.a}} & = & | ||
| + | \dfrac{\text{d.SSR}}{\text{d.Res}} * \dfrac{\text{d.Res}}{\text{d.b}} \\ | ||
| + | & = & (2 * \text{residual}) * \dfrac{ \text{d.Res}} {\text{d.b}} \\ | ||
| + | & = & (2 * \text{residual}) * \dfrac{y - (a + b * x)} {\text{d.b}} \\ | ||
| + | & = & 2 * \text{residual} * -x \\ | ||
| + | & = & -2 x * \text{residual} \\ | ||
| + | & = & -2 x * (y - (a + b * x)) \\ | ||
| + | & = & -2 x * (y - \widehat{y}) \\ | ||
| + | \end{eqnarray*} | ||
| + | |||
| - | y.hat = a + b * x | ||
| - | b = slope | ||
| - | d.sum.of.square.res / d.slope | ||
| - | = d.sum.of.square.res / d.sum.of.res * d.sum.of.res / d.slope | ||
| - | = d.sum.of.square.res / d.slope | ||
| - | = (2 * residual) * d(y - a - bx) | ||
| - | = (2 * residual) * - x | ||
| - | = - 2 * x * residual | ||
chain_rules.1755835495.txt.gz · Last modified: by hkimscil
