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/04 23:59] – [e.g.] hkimscil | chain_rules [2025/08/22 13:19] (current) – [e.g.] hkimscil | ||
---|---|---|---|
Line 5: | Line 5: | ||
y & =& f(g(x)) \\ | y & =& f(g(x)) \\ | ||
\frac {dy}{dx} & = & \frac {dy}{dt} * \frac {dt}{dx} | \frac {dy}{dx} & = & \frac {dy}{dt} * \frac {dt}{dx} | ||
- | & & \frac {dy}{dt} = f'(t) = f' | + | & & \frac {dy}{dt} = f'(t) = f' |
- | & & \because{ | + | & & \frac {dt}{dx} = g'(x) \\ |
- | & & \frac {dy}{dx} = f' | + | \therefore{ \;\; } \frac {dy}{dx} |
\end{eqnarray*} | \end{eqnarray*} | ||
+ | ====== E.g ====== | ||
\begin{eqnarray*} | \begin{eqnarray*} | ||
y & = & (2x^2 + 1)^2 \\ | y & = & (2x^2 + 1)^2 \\ | ||
t & = & 2x^2 + 1 \\ | t & = & 2x^2 + 1 \\ | ||
- | y & = & t^2 \\b | + | y & = & t^2 \\ |
t & = & 2x^2 + 1 \\ | t & = & 2x^2 + 1 \\ | ||
- | \frac{dy}{dt} & = & 2t \\ | + | \\ |
- | & = & 2 (2x^2 + 1) \\ | + | & |
- | & = & (4x^2 + 2) \\ | + | &\phantom{=}\, & = 2 (2x^2 + 1) \\ |
- | \frac{dt}{dx} & = & 4x \\ | + | &\phantom{=}\, & = (4x^2 + 2) \\ |
- | \therefore{} | + | \\ |
+ | & | ||
+ | \\ | ||
\frac{dy}{dx} & = & \frac{dy}{dt}*\frac{dt}{dx} \\ | \frac{dy}{dx} & = & \frac{dy}{dt}*\frac{dt}{dx} \\ | ||
& = & (4x^2 + 2) * 4x \\ | & = & (4x^2 + 2) * 4x \\ | ||
Line 26: | Line 29: | ||
====== e.g. ====== | ====== e.g. ====== | ||
+ | see [[:gradient descent]] | ||
+ | \begin{eqnarray*} | ||
+ | \because{ \;\; } \text{predicted value } \; \hat{y} & = & a + b x \\ | ||
+ | \text{and }\;\; \text{residual} & = & y - \hat{y} \\ | ||
+ | \therefore{} \;\; \text{residual}^2 & = & (y - (a + b x)) \\ | ||
+ | \therefore{} \sum{\text{residual}^2} & = & \sum{(y - (a + b x))^2} \\ | ||
+ | & = & \text{SSE, | ||
+ | \\ | ||
+ | \dfrac{\text{dSSE}}{\text{da}} & = & \\ | ||
+ | |||
+ | \end{eqnarray*} | ||
+ | |||
y.hat = a + b * x | y.hat = a + b * x | ||
a = intercept | a = intercept |
chain_rules.1754319575.txt.gz · Last modified: 2025/08/04 23:59 by hkimscil