Highlights from my Library: Hands-on Machine Learning with Scikit-Learn, Keras & TensorFlow by Aurélien Géron

Hands-on Machine Learning with Scikit-Learn, Keras, & TensorFlow by Aurélien Géron.

Look inside and/or buy on Amazon here (cheapest source I’ve seen from a cursory search).

This is a new addition that I’m not very far into yet, but I’m sufficiently impressed already to give it a mention.

I’ll have to come back and add some commentary once I’m further along because right now I’m just in chapter 3.

The first chapter is a succinct review of branches of machine learning (e.g. supervised vs. unsupervised vs. semi-supervised vs. reinforcement; batch vs. online, etc.), brief lists of major algorithms, and a discussion of critical concepts like overfitting vs. underfitting, training vs. test sets, and identifying high- vs. low-quality data. Concepts are organized well into categories and subcategories and presented in a cohesive manner.

The second chapter is a guided, code-through, ostensibly high-level but relatively complete overview of a regression task. It details up front how to install Jupyter, how to set up a virtual environment, and all the preparatory stuff, with the full code typed out, so you can indeed start from square one and won’t get lost at the installation stage due to not knowing some element that is considered obvious by non-novices (but this only takes a couple pages). Performance measures are discussed with equations intact. (It assumes you have taken linear algebra, but it doesn’t, for example, assume you know what the l1 and l2 norms are by name; I found it to be appropriately clear without derailing as someone with both math degrees and a background in math pegagogy.) You then pull housing data from the accompanying github and preview it in raw then visually with pandas and matplotlib; data is cleaned in a realistic, reasonable way. There is a naive approach to partitioning training and test sets, inspection of the pitfalls, modification, (brief) rinse and repeat until we are fit to appreciate the problems scikit-learn is solving for us when it is introduced, and we get an overview of it. We proceed through feature scaling, custom transformers, cross-validation, comparing models and their errors, consideration of ensemble methods, and eventually evaluation on the test set. (I didn’t list nearly everything that is covered.) Deployment methods are briefly discussed. This all takes place in about 50 pages with very large margins (the font and printed area amount to that of a standard hand-held paperback, despite the dimensions of the book itself).

Chapter 3 is classification in the context of handwriting OCR on the MNIST dataset, a famous set of 0 through 9 handwritten digits commonly referred to as the “Hello, world!” of machine learning. The coverage of true/false positives/negatives, i.e. the confusion matrix, i.e. precision and recall, is very beginner friendly, and is illustrated visually in a memorable way. I haven’t gotten very far in this chapter yet, so I can’t say more.

The book is in color, which a lot of reviews seem to love– I didn’t get why anyone cared before I was actually using the book, but I do appreciate it now while reading the code. It would be interesting if a similar colorization strategy to that of code editors were somehow employed in mathematical printing. I’m not sure if LATEX has anything like that where certain equation formats can be default colored in their output. While looking into this, I was amused to discover a survey of the LATEX font package on a pornographic image aggregator site. I wonder whether this was an in-joke, or the result of poor machine learning due to use of the word “latex” (there’s other image-heavy latex material ad copy on the site– yes, I searched the site, ha!).

Leave a Reply

Your email address will not be published. Required fields are marked *