Skip to content

Commit

Permalink
added notebook for simple gradient descent for 1D and 2D case
Browse files Browse the repository at this point in the history
  • Loading branch information
ovysotska committed Feb 2, 2020
1 parent b8173fb commit 543e685
Show file tree
Hide file tree
Showing 10 changed files with 1,008 additions and 16 deletions.
2 changes: 1 addition & 1 deletion Interpolation.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -570,7 +570,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.6.7"
"version": "3.6.8"
}
},
"nbformat": 4,
Expand Down
10 changes: 5 additions & 5 deletions Kullback_Leibler.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -260,21 +260,21 @@
],
"metadata": {
"kernelspec": {
"display_name": "Python 2",
"display_name": "Python 3",
"language": "python",
"name": "python2"
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 2
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython2",
"version": "2.7.14"
"pygments_lexer": "ipython3",
"version": "3.6.8"
}
},
"nbformat": 4,
Expand Down
Binary file added data/Convolution.pdf
Binary file not shown.
990 changes: 990 additions & 0 deletions gradient_descent.ipynb

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion homogeneous_coords.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.6.7"
"version": "3.6.8"
}
},
"nbformat": 4,
Expand Down
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion local_image_operators.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -568,7 +568,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.6.7"
"version": "3.6.8"
}
},
"nbformat": 4,
Expand Down
16 changes: 9 additions & 7 deletions ml_regression.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@
"$$\\frac{\\partial L}{\\partial a} = \\sum(y_i - ax_i -b)(-x_i)$$\n",
"$$\\frac{\\partial L}{\\partial b} = \\sum(y_i - ax_i -b)(-1)$$\n",
"\n",
"After some manipulations we can get the system of linear equation.\n\n",
"After some manipulations we can get the system of linear equation.\n",
"\n",
"$$\n",
"\\begin{pmatrix}\n",
" \\sum x_i^2 & \\sum x_i\\\\\n",
Expand All @@ -54,7 +55,8 @@
" \\sum y_i\n",
"\\end{pmatrix}\n",
"$$\n",
"\n\n",
"\n",
"\n",
"** Elegant solution **\n",
"\n",
"Consider $y = (y_1, .., y_n)$ be a vector and $x = [[x_1, 1], [x_2, 1], ..., [x_n, 1]]$ $nx2$ a matrix and $\\theta = (a,b)^T$ line parameters. Then given the fact that we fit a line, we minimize the following likelihood $ L = || y - x\\theta ||_{\\sum_i} $. Taken into account gaussian noise assumption\n",
Expand Down Expand Up @@ -176,21 +178,21 @@
],
"metadata": {
"kernelspec": {
"display_name": "Python 2",
"display_name": "Python 3",
"language": "python",
"name": "python2"
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 2
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython2",
"version": "2.7.14"
"pygments_lexer": "ipython3",
"version": "3.6.8"
}
},
"nbformat": 4,
Expand Down
2 changes: 1 addition & 1 deletion topological_sorting.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.6.5"
"version": "3.6.8"
}
},
"nbformat": 4,
Expand Down

0 comments on commit 543e685

Please sign in to comment.