Skip to content

Commit

Permalink
labels counts -> label counts
Browse files Browse the repository at this point in the history
  • Loading branch information
rasbt committed Oct 2, 2020
1 parent 653e4f5 commit dcd0707
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 10 deletions.
14 changes: 7 additions & 7 deletions ch03/ch03.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -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))"
]
},
{
Expand Down Expand Up @@ -1782,7 +1782,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.7.1"
"version": "3.8.3"
},
"toc": {
"nav_menu": {},
Expand Down
6 changes: 3 additions & 3 deletions ch03/ch03.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 2 additions & 0 deletions errata/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`
Expand Down

0 comments on commit dcd0707

Please sign in to comment.