File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ {
2+ "cells" : [
3+ {
4+ "cell_type" : " markdown" ,
5+ "metadata" : {},
6+ "source" : [
7+ " # Gradient Descent\n " ,
8+ " \n " ,
9+ " \n " ,
10+ " ## Cost Function\n " ,
11+ " The cost function can be written as follows:\n " ,
12+ " \n " ,
13+ " \\ begin{align}\n " ,
14+ " J(\\ theta_0, \\ theta_1) = \\ frac1{2m}\\ \\ sum_{k=1}^m ( h_\\ theta(x_i) - y_i )^2\n " ,
15+ " \\ end{align}"
16+ ]
17+ },
18+ {
19+ "cell_type" : " markdown" ,
20+ "metadata" : {},
21+ "source" : [
22+ " ## Gradient descent\n " ,
23+ " \n " ,
24+ " Repeat until convergence\n " ,
25+ " \n " ,
26+ " \\ begin{align}\n " ,
27+ " \\ theta_j := \\ theta_j - \\ alpha \\ frac{\\ partial}{\\ partial \\ theta_j} J(\\ theta_0, \\ theta_1)\n " ,
28+ " \\ end{align}"
29+ ]
30+ },
31+ {
32+ "cell_type" : " markdown" ,
33+ "metadata" : {},
34+ "source" : [
35+ " Will become: \n " ,
36+ " \n " ,
37+ " \\ begin{align}\n " ,
38+ " \\ theta_0 := \\ theta_0 - \\ alpha \\ frac1m \\ sum_{k=1}^m ( h_\\ theta(x_i) - y_i ) \\\\\n " ,
39+ " \\ theta_1 := \\ theta_1 - \\ alpha \\ frac1m \\ sum_{k=1}^m (( h_\\ theta(x_i) - y_i ) x_i)\n " ,
40+ " \\ end{align}"
41+ ]
42+ },
43+ {
44+ "cell_type" : " code" ,
45+ "execution_count" : null ,
46+ "metadata" : {},
47+ "outputs" : [],
48+ "source" : []
49+ }
50+ ],
51+ "metadata" : {
52+ "kernelspec" : {
53+ "display_name" : " Python 3" ,
54+ "language" : " python" ,
55+ "name" : " python3"
56+ },
57+ "language_info" : {
58+ "codemirror_mode" : {
59+ "name" : " ipython" ,
60+ "version" : 3
61+ },
62+ "file_extension" : " .py" ,
63+ "mimetype" : " text/x-python" ,
64+ "name" : " python" ,
65+ "nbconvert_exporter" : " python" ,
66+ "pygments_lexer" : " ipython3" ,
67+ "version" : " 3.6.8"
68+ }
69+ },
70+ "nbformat" : 4 ,
71+ "nbformat_minor" : 2
72+ }
Original file line number Diff line number Diff line change @@ -9,6 +9,7 @@ We have the following tutorials:
991 . [ Basic Descriptive Statistics] ( /descriptive_statistics.ipynb )
10102 . [ Linear Algebra] ( /linear_algebra.ipynb )
11113 . [ Probability] ( /Probability.ipynb )
12+ 4 . [ Machine Learning] ( /Machine_Learning.ipynb )
1213
1314## Datasets
1415
You can’t perform that action at this time.
0 commit comments