|
136 | 136 | "data": {
|
137 | 137 | "text/plain": [
|
138 | 138 | "(<Figure size 864x432 with 2 Axes>,\n",
|
139 |
| - " array([<matplotlib.axes._subplots.AxesSubplot object at 0x7fc943adaf10>,\n", |
140 |
| - " <matplotlib.axes._subplots.AxesSubplot object at 0x7fc9432001d0>],\n", |
| 139 | + " array([<matplotlib.axes._subplots.AxesSubplot object at 0x7f0c0c3f58d0>,\n", |
| 140 | + " <matplotlib.axes._subplots.AxesSubplot object at 0x7f0bc54b9410>],\n", |
141 | 141 | " dtype=object))"
|
142 | 142 | ]
|
143 | 143 | },
|
|
215 | 215 | "data": {
|
216 | 216 | "text/plain": [
|
217 | 217 | "(<Figure size 432x432 with 1 Axes>,\n",
|
218 |
| - " <matplotlib.axes._subplots.AxesSubplot at 0x7fc942fc7e10>)" |
| 218 | + " <matplotlib.axes._subplots.AxesSubplot at 0x7f0bc521ff90>)" |
219 | 219 | ]
|
220 | 220 | },
|
221 | 221 | "execution_count": 8,
|
|
249 | 249 | "metadata": {},
|
250 | 250 | "source": [
|
251 | 251 | "$$\n",
|
252 |
| - "\\Large error_i = \\hat{y_i} - y_i\n", |
| 252 | + "\\Large \\text{error}_i = \\hat{y_i} - y_i\n", |
253 | 253 | "$$"
|
254 | 254 | ]
|
255 | 255 | },
|
|
262 | 262 | "data": {
|
263 | 263 | "text/plain": [
|
264 | 264 | "(<Figure size 432x432 with 1 Axes>,\n",
|
265 |
| - " <matplotlib.axes._subplots.AxesSubplot at 0x7fc9430fbf90>)" |
| 265 | + " <matplotlib.axes._subplots.AxesSubplot at 0x7f0bc53b5e90>)" |
266 | 266 | ]
|
267 | 267 | },
|
268 | 268 | "execution_count": 9,
|
|
291 | 291 | "$$\n",
|
292 | 292 | "\\Large\n",
|
293 | 293 | "\\begin{aligned}\n",
|
294 |
| - "MSE &= \\frac{1}{n} \\sum_{i=1}^n{error_i}^2\n", |
| 294 | + "\\text{MSE} &= \\frac{1}{n} \\sum_{i=1}^n{\\text{error}_i}^2\n", |
295 | 295 | "\\\\\n",
|
296 | 296 | "&= \\frac{1}{n} \\sum_{i=1}^n{(\\hat{y_i} - y_i)}^2\n",
|
297 | 297 | "\\\\\n",
|
|
506 | 506 | "data": {
|
507 | 507 | "text/plain": [
|
508 | 508 | "(<Figure size 864x432 with 2 Axes>,\n",
|
509 |
| - " (<matplotlib.axes._subplots.Axes3DSubplot at 0x7fc942d92fd0>,\n", |
510 |
| - " <matplotlib.axes._subplots.AxesSubplot at 0x7fc9430497d0>))" |
| 509 | + " (<matplotlib.axes._subplots.Axes3DSubplot at 0x7f0bc507e410>,\n", |
| 510 | + " <matplotlib.axes._subplots.AxesSubplot at 0x7f0bc5306450>))" |
511 | 511 | ]
|
512 | 512 | },
|
513 | 513 | "execution_count": 18,
|
|
545 | 545 | "data": {
|
546 | 546 | "text/plain": [
|
547 | 547 | "(<Figure size 864x432 with 2 Axes>,\n",
|
548 |
| - " array([<matplotlib.axes._subplots.AxesSubplot object at 0x7fc9338ce190>,\n", |
549 |
| - " <matplotlib.axes._subplots.AxesSubplot object at 0x7fc941b8a150>],\n", |
| 548 | + " array([<matplotlib.axes._subplots.AxesSubplot object at 0x7f0bc2aef710>,\n", |
| 549 | + " <matplotlib.axes._subplots.AxesSubplot object at 0x7f0bc4266210>],\n", |
550 | 550 | " dtype=object))"
|
551 | 551 | ]
|
552 | 552 | },
|
|
578 | 578 | "data": {
|
579 | 579 | "text/plain": [
|
580 | 580 | "(<Figure size 864x432 with 2 Axes>,\n",
|
581 |
| - " array([<matplotlib.axes._subplots.AxesSubplot object at 0x7fc940063890>,\n", |
582 |
| - " <matplotlib.axes._subplots.AxesSubplot object at 0x7fc933959250>],\n", |
| 581 | + " array([<matplotlib.axes._subplots.AxesSubplot object at 0x7f0bc24c8250>,\n", |
| 582 | + " <matplotlib.axes._subplots.AxesSubplot object at 0x7f0bc249b4d0>],\n", |
583 | 583 | " dtype=object))"
|
584 | 584 | ]
|
585 | 585 | },
|
|
614 | 614 | "metadata": {},
|
615 | 615 | "source": [
|
616 | 616 | "$$\n",
|
617 |
| - "\\large\n", |
| 617 | + "\\Large\n", |
618 | 618 | "\\begin{aligned}\n",
|
619 |
| - "\\frac{\\partial{MSE}}{\\partial{b}} = \\frac{\\partial{MSE}}{\\partial{\\hat{y_i}}} \\cdot \\frac{\\partial{\\hat{y_i}}}{\\partial{b}} &= \\frac{1}{n} \\sum_{i=1}^n{2(b + w x_i - y_i)} \n", |
| 619 | + "\\frac{\\partial{\\text{MSE}}}{\\partial{b}} = \\frac{\\partial{\\text{MSE}}}{\\partial{\\hat{y_i}}} \\frac{\\partial{\\hat{y_i}}}{\\partial{b}} &= \\frac{1}{n} \\sum_{i=1}^n{2(b + w x_i - y_i)} \n", |
620 | 620 | "\\\\\n",
|
621 | 621 | "&= 2 \\frac{1}{n} \\sum_{i=1}^n{(\\hat{y_i} - y_i)}\n",
|
622 | 622 | "\\\\\n",
|
623 |
| - "\\frac{\\partial{MSE}}{\\partial{w}} = \\frac{\\partial{MSE}}{\\partial{\\hat{y_i}}} \\cdot \\frac{\\partial{\\hat{y_i}}}{\\partial{w}} &= \\frac{1}{n} \\sum_{i=1}^n{2(b + w x_i - y_i) \\cdot x_i} \n", |
| 623 | + "\\frac{\\partial{\\text{MSE}}}{\\partial{w}} = \\frac{\\partial{\\text{MSE}}}{\\partial{\\hat{y_i}}} \\frac{\\partial{\\hat{y_i}}}{\\partial{w}} &= \\frac{1}{n} \\sum_{i=1}^n{2(b + w x_i - y_i) x_i} \n", |
624 | 624 | "\\\\\n",
|
625 | 625 | "&= 2 \\frac{1}{n} \\sum_{i=1}^n{x_i (\\hat{y_i} - y_i)}\n",
|
626 | 626 | "\\end{aligned}\n",
|
|
663 | 663 | "data": {
|
664 | 664 | "text/plain": [
|
665 | 665 | "(<Figure size 864x432 with 2 Axes>,\n",
|
666 |
| - " array([<matplotlib.axes._subplots.AxesSubplot object at 0x7fc933a59490>,\n", |
667 |
| - " <matplotlib.axes._subplots.AxesSubplot object at 0x7fc933a73450>],\n", |
| 666 | + " array([<matplotlib.axes._subplots.AxesSubplot object at 0x7f0bc2ba1fd0>,\n", |
| 667 | + " <matplotlib.axes._subplots.AxesSubplot object at 0x7f0bc2bc12d0>],\n", |
668 | 668 | " dtype=object))"
|
669 | 669 | ]
|
670 | 670 | },
|
|
696 | 696 | "data": {
|
697 | 697 | "text/plain": [
|
698 | 698 | "(<Figure size 864x432 with 2 Axes>,\n",
|
699 |
| - " array([<matplotlib.axes._subplots.AxesSubplot object at 0x7fc94306e490>,\n", |
700 |
| - " <matplotlib.axes._subplots.AxesSubplot object at 0x7fc94010d390>],\n", |
| 699 | + " array([<matplotlib.axes._subplots.AxesSubplot object at 0x7f0bc2c60650>,\n", |
| 700 | + " <matplotlib.axes._subplots.AxesSubplot object at 0x7f0bc2c5a390>],\n", |
701 | 701 | " dtype=object))"
|
702 | 702 | ]
|
703 | 703 | },
|
|
741 | 741 | "$$\n",
|
742 | 742 | "\\Large\n",
|
743 | 743 | "\\begin{aligned}\n",
|
744 |
| - "& b = b - \\eta \\frac{\\partial{MSE}}{\\partial{b}}\n", |
| 744 | + "b &= b - \\eta \\frac{\\partial{\\text{MSE}}}{\\partial{b}}\n", |
745 | 745 | "\\\\\n",
|
746 |
| - "& w = w - \\eta \\frac{\\partial{MSE}}{\\partial{w}}\n", |
| 746 | + "w &= w - \\eta \\frac{\\partial{\\text{MSE}}}{\\partial{w}}\n", |
747 | 747 | "\\end{aligned}\n",
|
748 | 748 | "$$"
|
749 | 749 | ]
|
|
784 | 784 | "data": {
|
785 | 785 | "text/plain": [
|
786 | 786 | "(<Figure size 432x432 with 1 Axes>,\n",
|
787 |
| - " <matplotlib.axes._subplots.AxesSubplot at 0x7fc94200a050>)" |
| 787 | + " <matplotlib.axes._subplots.AxesSubplot at 0x7f0bc42c5750>)" |
788 | 788 | ]
|
789 | 789 | },
|
790 | 790 | "execution_count": 25,
|
|
831 | 831 | "cell_type": "markdown",
|
832 | 832 | "metadata": {},
|
833 | 833 | "source": [
|
834 |
| - "#### Small Learning Rate" |
| 834 | + "#### Low Learning Rate" |
835 | 835 | ]
|
836 | 836 | },
|
837 | 837 | {
|
|
843 | 843 | "data": {
|
844 | 844 | "text/plain": [
|
845 | 845 | "(<Figure size 864x432 with 2 Axes>,\n",
|
846 |
| - " array([<matplotlib.axes._subplots.AxesSubplot object at 0x7fc94014f650>,\n", |
847 |
| - " <matplotlib.axes._subplots.AxesSubplot object at 0x7fc9401a00d0>],\n", |
| 846 | + " array([<matplotlib.axes._subplots.AxesSubplot object at 0x7f0bc42e7810>,\n", |
| 847 | + " <matplotlib.axes._subplots.AxesSubplot object at 0x7f0bc3dd4690>],\n", |
848 | 848 | " dtype=object))"
|
849 | 849 | ]
|
850 | 850 | },
|
|
874 | 874 | "cell_type": "markdown",
|
875 | 875 | "metadata": {},
|
876 | 876 | "source": [
|
877 |
| - "#### Big Learning Rate" |
| 877 | + "#### High Learning Rate" |
878 | 878 | ]
|
879 | 879 | },
|
880 | 880 | {
|
|
886 | 886 | "data": {
|
887 | 887 | "text/plain": [
|
888 | 888 | "(<Figure size 864x432 with 2 Axes>,\n",
|
889 |
| - " array([<matplotlib.axes._subplots.AxesSubplot object at 0x7fc9402c4b50>,\n", |
890 |
| - " <matplotlib.axes._subplots.AxesSubplot object at 0x7fc94025cb10>],\n", |
| 889 | + " array([<matplotlib.axes._subplots.AxesSubplot object at 0x7f0bc2539190>,\n", |
| 890 | + " <matplotlib.axes._subplots.AxesSubplot object at 0x7f0bc2d8b350>],\n", |
891 | 891 | " dtype=object))"
|
892 | 892 | ]
|
893 | 893 | },
|
|
917 | 917 | "cell_type": "markdown",
|
918 | 918 | "metadata": {},
|
919 | 919 | "source": [
|
920 |
| - "#### Very Big Learning Rate" |
| 920 | + "#### Very High Learning Rate" |
921 | 921 | ]
|
922 | 922 | },
|
923 | 923 | {
|
|
929 | 929 | "data": {
|
930 | 930 | "text/plain": [
|
931 | 931 | "(<Figure size 864x432 with 2 Axes>,\n",
|
932 |
| - " array([<matplotlib.axes._subplots.AxesSubplot object at 0x7fc94024f890>,\n", |
933 |
| - " <matplotlib.axes._subplots.AxesSubplot object at 0x7fc94014f550>],\n", |
| 932 | + " array([<matplotlib.axes._subplots.AxesSubplot object at 0x7f0bc2cdf710>,\n", |
| 933 | + " <matplotlib.axes._subplots.AxesSubplot object at 0x7f0bc42c5350>],\n", |
934 | 934 | " dtype=object))"
|
935 | 935 | ]
|
936 | 936 | },
|
|
1051 | 1051 | "data": {
|
1052 | 1052 | "text/plain": [
|
1053 | 1053 | "(<Figure size 864x432 with 2 Axes>,\n",
|
1054 |
| - " array([<matplotlib.axes._subplots.AxesSubplot object at 0x7fc931f41450>,\n", |
1055 |
| - " <matplotlib.axes._subplots.AxesSubplot object at 0x7fc931f6b410>],\n", |
| 1054 | + " array([<matplotlib.axes._subplots.AxesSubplot object at 0x7f0bc0a10510>,\n", |
| 1055 | + " <matplotlib.axes._subplots.AxesSubplot object at 0x7f0bc0a35410>],\n", |
1056 | 1056 | " dtype=object))"
|
1057 | 1057 | ]
|
1058 | 1058 | },
|
|
1086 | 1086 | "data": {
|
1087 | 1087 | "text/plain": [
|
1088 | 1088 | "(<Figure size 864x432 with 2 Axes>,\n",
|
1089 |
| - " array([<matplotlib.axes._subplots.AxesSubplot object at 0x7fc931e74f90>,\n", |
1090 |
| - " <matplotlib.axes._subplots.AxesSubplot object at 0x7fc931e26950>],\n", |
| 1089 | + " array([<matplotlib.axes._subplots.AxesSubplot object at 0x7f0bc094a190>,\n", |
| 1090 | + " <matplotlib.axes._subplots.AxesSubplot object at 0x7f0bc08f35d0>],\n", |
1091 | 1091 | " dtype=object))"
|
1092 | 1092 | ]
|
1093 | 1093 | },
|
|
1129 | 1129 | "\\sigma(X) = \\sqrt{\\frac{1}{N}\\sum_{i=1}^N{(x_i - \\overline{X})^2}}\n",
|
1130 | 1130 | "\\\\\n",
|
1131 | 1131 | "\\Large\n",
|
1132 |
| - "scaled x_i=\\frac{x_i-\\overline{X}}{\\sigma(X)}\n", |
| 1132 | + "\\text{scaled } x_i=\\frac{x_i-\\overline{X}}{\\sigma(X)}\n", |
1133 | 1133 | "$$"
|
1134 | 1134 | ]
|
1135 | 1135 | },
|
|
0 commit comments