Skip to content

Commit 1bef414

Browse files
committed
revision
1 parent ce3ba67 commit 1bef414

28 files changed

+588
-486
lines changed

Chapter00.ipynb

+36-36
Original file line numberDiff line numberDiff line change
@@ -136,8 +136,8 @@
136136
"data": {
137137
"text/plain": [
138138
"(<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",
141141
" dtype=object))"
142142
]
143143
},
@@ -215,7 +215,7 @@
215215
"data": {
216216
"text/plain": [
217217
"(<Figure size 432x432 with 1 Axes>,\n",
218-
" <matplotlib.axes._subplots.AxesSubplot at 0x7fc942fc7e10>)"
218+
" <matplotlib.axes._subplots.AxesSubplot at 0x7f0bc521ff90>)"
219219
]
220220
},
221221
"execution_count": 8,
@@ -249,7 +249,7 @@
249249
"metadata": {},
250250
"source": [
251251
"$$\n",
252-
"\\Large error_i = \\hat{y_i} - y_i\n",
252+
"\\Large \\text{error}_i = \\hat{y_i} - y_i\n",
253253
"$$"
254254
]
255255
},
@@ -262,7 +262,7 @@
262262
"data": {
263263
"text/plain": [
264264
"(<Figure size 432x432 with 1 Axes>,\n",
265-
" <matplotlib.axes._subplots.AxesSubplot at 0x7fc9430fbf90>)"
265+
" <matplotlib.axes._subplots.AxesSubplot at 0x7f0bc53b5e90>)"
266266
]
267267
},
268268
"execution_count": 9,
@@ -291,7 +291,7 @@
291291
"$$\n",
292292
"\\Large\n",
293293
"\\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",
295295
"\\\\\n",
296296
"&= \\frac{1}{n} \\sum_{i=1}^n{(\\hat{y_i} - y_i)}^2\n",
297297
"\\\\\n",
@@ -506,8 +506,8 @@
506506
"data": {
507507
"text/plain": [
508508
"(<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>))"
511511
]
512512
},
513513
"execution_count": 18,
@@ -545,8 +545,8 @@
545545
"data": {
546546
"text/plain": [
547547
"(<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",
550550
" dtype=object))"
551551
]
552552
},
@@ -578,8 +578,8 @@
578578
"data": {
579579
"text/plain": [
580580
"(<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",
583583
" dtype=object))"
584584
]
585585
},
@@ -614,13 +614,13 @@
614614
"metadata": {},
615615
"source": [
616616
"$$\n",
617-
"\\large\n",
617+
"\\Large\n",
618618
"\\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",
620620
"\\\\\n",
621621
"&= 2 \\frac{1}{n} \\sum_{i=1}^n{(\\hat{y_i} - y_i)}\n",
622622
"\\\\\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",
624624
"\\\\\n",
625625
"&= 2 \\frac{1}{n} \\sum_{i=1}^n{x_i (\\hat{y_i} - y_i)}\n",
626626
"\\end{aligned}\n",
@@ -663,8 +663,8 @@
663663
"data": {
664664
"text/plain": [
665665
"(<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",
668668
" dtype=object))"
669669
]
670670
},
@@ -696,8 +696,8 @@
696696
"data": {
697697
"text/plain": [
698698
"(<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",
701701
" dtype=object))"
702702
]
703703
},
@@ -741,9 +741,9 @@
741741
"$$\n",
742742
"\\Large\n",
743743
"\\begin{aligned}\n",
744-
"& b = b - \\eta \\frac{\\partial{MSE}}{\\partial{b}}\n",
744+
"b &= b - \\eta \\frac{\\partial{\\text{MSE}}}{\\partial{b}}\n",
745745
"\\\\\n",
746-
"& w = w - \\eta \\frac{\\partial{MSE}}{\\partial{w}}\n",
746+
"w &= w - \\eta \\frac{\\partial{\\text{MSE}}}{\\partial{w}}\n",
747747
"\\end{aligned}\n",
748748
"$$"
749749
]
@@ -784,7 +784,7 @@
784784
"data": {
785785
"text/plain": [
786786
"(<Figure size 432x432 with 1 Axes>,\n",
787-
" <matplotlib.axes._subplots.AxesSubplot at 0x7fc94200a050>)"
787+
" <matplotlib.axes._subplots.AxesSubplot at 0x7f0bc42c5750>)"
788788
]
789789
},
790790
"execution_count": 25,
@@ -831,7 +831,7 @@
831831
"cell_type": "markdown",
832832
"metadata": {},
833833
"source": [
834-
"#### Small Learning Rate"
834+
"#### Low Learning Rate"
835835
]
836836
},
837837
{
@@ -843,8 +843,8 @@
843843
"data": {
844844
"text/plain": [
845845
"(<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",
848848
" dtype=object))"
849849
]
850850
},
@@ -874,7 +874,7 @@
874874
"cell_type": "markdown",
875875
"metadata": {},
876876
"source": [
877-
"#### Big Learning Rate"
877+
"#### High Learning Rate"
878878
]
879879
},
880880
{
@@ -886,8 +886,8 @@
886886
"data": {
887887
"text/plain": [
888888
"(<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",
891891
" dtype=object))"
892892
]
893893
},
@@ -917,7 +917,7 @@
917917
"cell_type": "markdown",
918918
"metadata": {},
919919
"source": [
920-
"#### Very Big Learning Rate"
920+
"#### Very High Learning Rate"
921921
]
922922
},
923923
{
@@ -929,8 +929,8 @@
929929
"data": {
930930
"text/plain": [
931931
"(<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",
934934
" dtype=object))"
935935
]
936936
},
@@ -1051,8 +1051,8 @@
10511051
"data": {
10521052
"text/plain": [
10531053
"(<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",
10561056
" dtype=object))"
10571057
]
10581058
},
@@ -1086,8 +1086,8 @@
10861086
"data": {
10871087
"text/plain": [
10881088
"(<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",
10911091
" dtype=object))"
10921092
]
10931093
},
@@ -1129,7 +1129,7 @@
11291129
"\\sigma(X) = \\sqrt{\\frac{1}{N}\\sum_{i=1}^N{(x_i - \\overline{X})^2}}\n",
11301130
"\\\\\n",
11311131
"\\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",
11331133
"$$"
11341134
]
11351135
},

Chapter01.ipynb

+5-1
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,11 @@
5454
"cell_type": "markdown",
5555
"metadata": {},
5656
"source": [
57-
"# A Simple Regression Problem"
57+
"# A Simple Regression Problem\n",
58+
"\n",
59+
"$$\n",
60+
"\\Large y = b + w x + \\epsilon\n",
61+
"$$"
5862
]
5963
},
6064
{

0 commit comments

Comments
 (0)