diff --git a/ML Notes.md b/ML Notes.md index 9c71ec0..0f82026 100644 --- a/ML Notes.md +++ b/ML Notes.md @@ -1,6 +1,7 @@ ## Basic hypothesis (model): $$ h_\theta(x) = \theta_o x_0 + \theta_1 x_1 + \theta_2 x_2....\theta_n x_n $$ + where $\theta_n$ is a parameter value to be calculated and $x_n$ is the value for the feature in the sample (training) data (with n features) Basic cost function: @@ -25,8 +26,10 @@ Gradient descent uses partial derivatives with respect to each $\theta$ value, o for each iteration, calculate new $\theta$ values: + $$ \theta_0 = \theta_0 - \alpha\frac{1}{m}\sum_{i=1}^m(h_\theta(x^{i}) - y^{i})*x_0^{(i)}) $$ $$ \theta_1 = \theta_1 - \alpha\frac{1}{m}\sum_{i=1}^m(h_\theta(x^{i}) - y^{i})*x_1^{(i)}) $$ + ... $$ \theta_n = \theta_n - \alpha\frac{1}{m}\sum_{i=1}^m(h_\theta(x^{i}) - y^{i})*x_n^{(i)}) $$