Site icon TechTalks

3 things to check before buying a book on Python machine learning

machine learning books

This article is part of “AI education”, a series of posts that review and explore educational content on data science and machine learning. (In partnership with Paperspace)

With so many books on Python machine learning, making a choice is becoming increasingly difficult. You’re investing both your time and money to learn something that can open new career paths for you. It would a disappointment to get halfway through a 700-page machine learning book to realize it’s not for you.

Having read and reviewed many books on Python machine learning, I can attest that every volume is unique in its own right. And with so many books having similar titles, the choice can be confusing, especially if you’re at the beginning of your machine learning journey.

Here are five things that will help you better evaluate a Python machine learning book before buying it.

The prerequisites

Every book on programming has a section in the preface or intro where the authors describe the book’s intended audience. This part is usually titled “prerequisites” or “who should read this book.” If you’re at a bookstore, pick up the book and flip to this section. If you’re buying online, Amazon and other online stores let you view the first few pages of the book, including the prerequisites section.

Here are a few things that are worth looking out for in the prerequisites section:

An example prerequisites section from a Python machine learning book

If a book doesn’t clearly state the requirements, don’t worry. We have other ways to find out.

The table of contents

A look at the table of contents will give a good picture of how deep it goes in different areas of machine learning and Python libraries. Most online bookstores let you look at the table of contents before buying the book. The table of contents will help you fill some of the gaps if the prerequisites section doesn’t explicitly state what you need to know before reading the book.

Here are a few things to look for in the table of contents:

Introductory books contain chapters that explain basic Python libraries used in data science and ML tasks (Source: Principles of Data Science)
Beginner and intermediate books provide a high-level view of the entire machine learning pipeline with an end-to-end example. (Source: Hands-On Machine Learning with Scikit-Learn, Keras, and TensorFlow: Concepts, Tools, and Techniques to Build Intelligent Systems, 2nd Edition)

The code repo

While you can’t judge a machine learning book by its cover, in my experience, its code samples tell a lot about the book’s quality and its intended audience. Most Python machine learning books come with an accompanying GitHub repository, where you can get access to the code samples. The address to the repository is usually written in the book’s introduction, but you can also find it by googling the book’s title along with GitHub.

The official GitHub of the book is usually filed under the profile of the book’s author or the publisher. Make sure you don’t land on fake repos.

Most machine learning books have a GitHub repository that can be found through Google search.

GitHub repositories of Python machine learning books have different structures. In general, you should see one folder for the notebooks and code samples of each chapter, and separate folders for assets such as datasets and images.

Open one of the chapter folders and examine its contents. Here are a few things that can determine the quality of the code:

Good code examples should contain comments that describe the steps of each experiment (Source: Machine Learning Algorithms, Second Edition)

Aside from the quality, the code files provide some good hints on the audience of the book in case the prerequisite section doesn’t provide enough information:

Generator functions like make_blob create data sets that are good for testing machine learning algorithms, but don’t provide real-world context

Final thoughts

No single book to make you a master of Python machine learning. But hopefully, these tips will help you make the best of your time and money and have a smooth path in teaching yourself machine learning.

All this said, here are a few recommendations based on what we’ve reviewed before:

Exit mobile version