Errata

Hands-On Machine Learning with Scikit-Learn, Keras, and TensorFlow

Errata for Hands-On Machine Learning with Scikit-Learn, Keras, and TensorFlow, Third Edition

Submit your own errata for this product.

The errata list is a list of errors and their corrections that were found after the product was released. If the error was corrected in a later version or reprint the date of the correction will be displayed in the column titled "Date Corrected".

The following errata were submitted by our customers and approved as valid errors by the author or editor.

Color key: Serious technical mistake Minor technical mistake Language or formatting error Typo Question Note Update

Version Location Description Submitted By Date submitted Date corrected
Page Front matter
Revision History for the Third Edition

Link to errata page says:
"See <orielly_url>/catalog/errata.csp?isbn=9781492032649 for release details."

Which is the link for the 2nd edition. The 3rd edition link is:
<oreilly_url>/catalog/errata.csp?isbn=9781098125974

I have obfuscated the full URLs as this form does not allow submissions containing URLs.

Note from the Author or Editor:
Great catch, thanks! I just fixed all the links to point to the 3rd edition.

Rasmi Elasmar  Dec 26, 2022  Jan 20, 2023
Page xxiv
Acknowledgments

"Siddha Gangju" should be "Siddha Ganju"

Note from the Author or Editor:
Oh, really sorry about that! This is now fixed.

O'Reilly Media
 
Jan 03, 2023  Jan 20, 2023
Page Ch 9, page 291
2nd paragraph

The text says that thethas value is 1.5, but if we check the plots in the previous page, the max is around 1.65

Note from the Author or Editor:
Great catch, thanks! Indeed, the max is around 1.65 (about 1.66, in fact). I fixed the text.

Juan Manuel Parrilla Gutierrez  Jan 07, 2023  Jan 20, 2023
Page Preface
Conventions Used in This Book

The "Punctuation" section mentions "Punctutation" (note the extra t).

I checked Amazon "look inside", which indicates the same error in the print version.

Note from the Author or Editor:
Good catch, thank you! That's a typo, it should indeed be "punctuation".

Gary Shymkiw  Aug 12, 2023 
Page Chapter 5, Nonlinear SVM Classification, SVM Classes and Computational Complexity
1st, 2nd, 3rd paragraph and Table 5-1

Big O notation is rendered incorrectly: e.g., instead of O (m × n) it is ݓm_ × n). I checked it in the latest versions of Google Chrome and Safari.

Note from the Author or Editor:
Good catch, thanks.
I used U+1D4AA Mathematical Script Capital O Unicode Character, but unfortunately it wasn't supported by the rendering tools downstream. So I replaced it with a regular capital O.

Victor Khaustov  May 31, 2022  Oct 03, 2022
Page Chapter 7, Bagging and Pasting in Scikit-Learn
Code example after the 1st paragraph

n_jobs=-1 argument should be added to the code example to match the description and the GitHub notebook.

Note from the Author or Editor:
Indeed, the book and notebook were not in sync. I added n_jobs=-1 to the book, thank you!

Victor Khaustov  Jun 10, 2022  Oct 03, 2022
Page Chapter 7, Random Forests
1st paragraph

The following sentence should be updated: "The following code trains a Random Forest classifier with 500 trees, each limited to maximum 16 nodes, and using all available CPU cores:". Instead of "maximum 16 nodes" -> "maximum 16 leaf nodes". The tree will have maximum 16 leaf nodes and 15 (16 - 1) split nodes.

Note from the Author or Editor:
Great catch, thanks. As you suggested, I replaced "maximum 16 nodes" with "maximum 16 leaf nodes".

Victor Khaustov  Jun 10, 2022  Oct 03, 2022
Page Chapter 7, Boosting, Histogram-Based Gradient Boosting
2nd paragraph

Another formatting issue for the Big O notation: ݓn_×m) -> O (n×m) and ݓn_×m×log(m)) -> O (n×m×log(m)).

Note from the Author or Editor:
Good catch, thanks.
I used U+1D4AA Mathematical Script Capital O Unicode Character, but unfortunately it wasn't supported by the rendering tools downstream. So I replaced it with a regular capital O.

Victor Khaustov  Jun 10, 2022  Oct 03, 2022
Page Chapter 7, Boosting, Histogram-Based Gradient Boosting
2nd paragraph

Either clarification is required for the following sentence "In practice, this means that HGB can train hundreds of times faster than regular GBRT on large datasets." or the big O notation should be updated to show that "n" is not the same (e.g., n<sub>bins</sub> may be used to show that it is not the number of features but the number of bins).

Note from the Author or Editor:
Excellent point, thank you. I replaced the previous sentence with:

As a result, this implementation has a computational complexity of _O_(_b_×_m_) instead of _O_(_n_×_m_×log(_m_)), where _b_ is the number of bins, _m_ is the number of training instances, and _n_ is the number of features.

Victor Khaustov  Jun 10, 2022  Oct 03, 2022
Page Chapter 7, Stacking
2nd paragraph

"can be simply be copied" -> "can simply be copied"

Note from the Author or Editor:
Good catch, thanks!

Victor Khaustov  Jun 10, 2022  Oct 03, 2022
Page 425
Footnote

The footnote states: "Due to TensorFlow issue #46858, the call to super().build() may fail in this case, unless the issue was fixed by the time you read this. If not, you need to replace this line with self.built = True."

However, on the code snippet, neither "super().build()" nor "self.built = True" appear. They do appear in the Google colab and and GitHub.

The footnote (as well as the code in Google colab and GitHub) should be removed, as "super().build()" is deprecated in the latest TensorFlow versions (> v2.5.0), Keras will call it for us.

Note from the Author or Editor:
Good catch, thanks. Indeed, calling super().build() or setting self.built = True is no longer needed, and I removed it from the code in the book, but I forgot to remove the footnote. I'll also update the Colab notebooks now.

Marcos Rodrigo  Aug 09, 2023 
Page 483
Figure 14-3

In Fig 14-3, the bottom blue 3x3 square should be sifted by one square, since the stride in that figure is 1.

Note from the Author or Editor:
Great catch, thanks a lot! This figure was correct in the previous editions, but it was not very pretty, so we tried to beautify it, but in the process we made a copy/paste error with Figure 14-4. My apologies, I should have caught that. This is now fixed.

Eugenio Marco Rubio  Dec 12, 2022  Jan 20, 2023