From dcd07071bafbadba949622b87e56dc1fc8898ebf Mon Sep 17 00:00:00 2001 From: rasbt Date: Thu, 1 Oct 2020 22:39:32 -0500 Subject: [PATCH] labels counts -> label counts --- ch03/ch03.ipynb | 14 +++++++------- ch03/ch03.py | 6 +++--- errata/README.md | 2 ++ 3 files changed, 12 insertions(+), 10 deletions(-) diff --git a/ch03/ch03.ipynb b/ch03/ch03.ipynb index d0ab7ca5..e8af323a 100644 --- a/ch03/ch03.ipynb +++ b/ch03/ch03.ipynb @@ -210,16 +210,16 @@ "name": "stdout", "output_type": "stream", "text": [ - "Labels counts in y: [50 50 50]\n", - "Labels counts in y_train: [35 35 35]\n", - "Labels counts in y_test: [15 15 15]\n" + "Labels count in y: [50 50 50]\n", + "Labels count in y_train: [35 35 35]\n", + "Labels count in y_test: [15 15 15]\n" ] } ], "source": [ - "print('Labels counts in y:', np.bincount(y))\n", - "print('Labels counts in y_train:', np.bincount(y_train))\n", - "print('Labels counts in y_test:', np.bincount(y_test))" + "print('Labels count in y:', np.bincount(y))\n", + "print('Labels count in y_train:', np.bincount(y_train))\n", + "print('Labels count in y_test:', np.bincount(y_test))" ] }, { @@ -1782,7 +1782,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.7.1" + "version": "3.8.3" }, "toc": { "nav_menu": {}, diff --git a/ch03/ch03.py b/ch03/ch03.py index 9235667c..fbc0e06a 100644 --- a/ch03/ch03.py +++ b/ch03/ch03.py @@ -103,9 +103,9 @@ -print('Labels counts in y:', np.bincount(y)) -print('Labels counts in y_train:', np.bincount(y_train)) -print('Labels counts in y_test:', np.bincount(y_test)) +print('Label counts in y:', np.bincount(y)) +print('Label counts in y_train:', np.bincount(y_train)) +print('Label counts in y_test:', np.bincount(y_test)) # Standardizing the features: diff --git a/errata/README.md b/errata/README.md index 3c235a5f..0cef0c1a 100644 --- a/errata/README.md +++ b/errata/README.md @@ -16,6 +16,8 @@ ## Chapter 3 +- pg. 55 & 56: Says `print('Labels counts ...` in code, but "labels counts" is grammatically wrong and should be "label counts." + - pg. 56: The comment about the `n_iter` method can be ignored as it does not apply to recent scikit-learn versions (0.21 and newer) - pg. 84: It says "XOR gate using the `logical_or` function from NumPy, " near the bottom, but it should be `logical_xor` instead of `logical_or`