diff --git a/docs/feature_engineering/feature_engineering.html b/docs/feature_engineering/feature_engineering.html index 026aba6a..f426070b 100644 --- a/docs/feature_engineering/feature_engineering.html +++ b/docs/feature_engineering/feature_engineering.html @@ -360,7 +360,7 @@

\(f_{\vec{\theta}}(\vec{x})\) for \(\hat{y}\), our loss function becomes \(l(\vec{\theta}, \vec{x}, \hat{y}) = (y_i - \theta_0x_0 - \theta_1x_1)^2\).

+

Plugging in \(f_{\vec{\theta}}(\vec{x})\) for \(\hat{y}\), our loss function becomes \(l(\vec{\theta}, \vec{x}, y_i) = (y_i - \theta_0x_0 - \theta_1x_1)^2\).

To calculate our gradient vector, we can start by computing the partial derivative of the loss function with respect to \(\theta_0\): \[\frac{\partial}{\partial \theta_{0}} l(\vec{\theta}, \vec{x}, y_i) = 2(y_i - \theta_0x_0 - \theta_1x_1)(-x_0)\]

Let’s now do the same but with respect to \(\theta_1\): \[\frac{\partial}{\partial \theta_{1}} l(\vec{\theta}, \vec{x}, y_i) = 2(y_i - \theta_0x_0 - \theta_1x_1)(-x_1)\]

Putting this together, our gradient vector is: \[\nabla_{\theta} l(\vec{\theta}, \vec{x}, y_i) = \begin{bmatrix} -2(y_i - \theta_0x_0 - \theta_1x_1)(x_0) \\ -2(y_i - \theta_0x_0 - \theta_1x_1)(x_1) \end{bmatrix}\]

@@ -1199,7 +1199,7 @@

\end{align} $$ -Plugging in $f_{\vec{\theta}}(\vec{x})$ for $\hat{y}$, our loss function becomes $l(\vec{\theta}, \vec{x}, \hat{y}) = (y_i - \theta_0x_0 - \theta_1x_1)^2$. +Plugging in $f_{\vec{\theta}}(\vec{x})$ for $\hat{y}$, our loss function becomes $l(\vec{\theta}, \vec{x}, y_i) = (y_i - \theta_0x_0 - \theta_1x_1)^2$. To calculate our gradient vector, we can start by computing the partial derivative of the loss function with respect to $\theta_0$: $$\frac{\partial}{\partial \theta_{0}} l(\vec{\theta}, \vec{x}, y_i) = 2(y_i - \theta_0x_0 - \theta_1x_1)(-x_0)$$ diff --git a/docs/gradient_descent/gradient_descent.html b/docs/gradient_descent/gradient_descent.html index 1b459ccd..154abb3f 100644 --- a/docs/gradient_descent/gradient_descent.html +++ b/docs/gradient_descent/gradient_descent.html @@ -746,9 +746,9 @@

-