Skip to content

Commit cf2f3bd

Browse files
committed
update MSE normalization
1 parent 7ff5729 commit cf2f3bd

File tree

3 files changed

+33
-28
lines changed

3 files changed

+33
-28
lines changed

ERRATA/README.md

+6
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@ The doc strings of the LogisticRegressionGD classifier reference "Mean squared e
1212

1313
Add bias unit to the net input.
1414

15+
**Page 354**
16+
17+
The MSE is normalized via `mse = mse/i` but should be normalized via `mse = mse/(i+1)` instead. (This does not affect the results in shown below though. The MSE is still 0.3.)
18+
1519
**Page 361**
1620

1721
$$\frac{\partial}{\partial w_{j, l}^{(l)}}=L(\boldsymbol{W}, \boldsymbol{b})$$
@@ -20,6 +24,8 @@ should be
2024

2125
$$\frac{\partial L}{\partial w_{j, l}^{(l)}}$$
2226

27+
28+
2329
## Chapter 12
2430

2531
**Page 380**

ch11/ch11.ipynb

+26-27
Large diffs are not rendered by default.

ch11/ch11.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -375,7 +375,7 @@ def compute_mse_and_acc(nnet, X, y, num_labels=10, minibatch_size=100):
375375
num_examples += targets.shape[0]
376376
mse += loss
377377

378-
mse = mse/i
378+
mse = mse/(i+1)
379379
acc = correct_pred/num_examples
380380
return mse, acc
381381

0 commit comments

Comments
 (0)