Review: Machine Learning with Python Cookbook

Recently, I purchased the book Machine Learning with Python Cookbook by Chris Albon (@chrisalbon). I finished it in one week, while I followed each piece of code on my computer. In this post, I will review this book and at the end, I will conclude with my proposition to buy or not to buy.

Contents of the book

1. Vectors, Matrices, and Arrays
3. Data Wrangling
4. Handling Numerical Data
5. Handling Categorical Data
6. Handling Text
7. Handling Dates and Times
8. Handling Images
9. Dimensionality Reduction Using Feature Extraction
10. Dimensionality Reduction Using Feature Selection
11. Model Evaluation
12. Model Selection
13. Linear Regression
14. Trees and Forests
15. K-Nearest Neighbors
16. Logistic Regression
17. Support Vector Machines
18. Naive Bayes
19. Clustering
20. Neural Networks

I will share my thoughts from each section of this book alongside with my opinion on the matters throughout my experience in the field of Data Science.

Chapters 1, 2, and 3

These are the three introductory chapters of this book. In the first chapter, Chris grabs you by your hand and walks you through the vectors, matrices and arrays in Python. He introduces the Numpy library and teaches you how to handle these three fundamental structures for Data Science. Also, introduces Pandas library. With Pandas you create DataFrames and it provides you with all the necessary tools for data manipulation. I followed along, despite the fact I already knew that field. I really enjoyed those chapters!

Chapters 4, 5, 6, 7, and 8

In these five chapters, Chris walks you through the preprocessing of various data types. It teaches you how to handle numerical and categorical data, text, etc… Going from the introductory level to advanced topics, with the help of scikit-learn, pandas and numpy you learn how to preprocess your data and prep them for your Machine Learning model.

Chapters 9 and 10

Chapters 9 and 10 refer to a very big problem in machine learning. Books upon books have been written for this matter. It is called Dimensionality Reduction. It is a fundamental process where you reduce the number of dimensions (features) from your data in order to lower your computational complexity without compromising your output. Chris dives into Feature extraction and Feature selection and teaches you how to find patterns, correlations and features in your data.

Chapter 11

In this chapter, you will learn how to evaluate your model. Chris goes through all common Machine Learning strategies (classification, clustering, regression, etc) and teaches you how to evaluate your model. It talks about methods and formulas you can use to separate ‘good’ and ‘bad’ models, how to cross-validate and how to visualize the results of your evaluation.

Chapter 12

In chapter 12, you will discover methods that help you select the best possible model. You will learn how to select the hyperparameters of your model and how to speed up the process of searching for the best.

Chapters 13 to 19

These seven chapters walk you through the basics of the most common ML models and algorithms, such as Regression, Random Forests, SVMs, Clustering and more! Teaches you how to use those algorithms and how they work.

Chapter 20

I deliberately left Neural Networks (NN) outside of the previous seven chapters, because this is an extensive analysis on how to solve problems with NN and DeepLearning. Chris makes an introduction on NNs and starts the chapter on how you can preprocess data and what the NN expects. Teaches you how you can design your own NN and what Deep Learning really means. In this section, you will get introduced to Keras, a high-level framework for creating NNs. You will learn how to tackle common problems with NNs and how to analyse the training process, how to evaluate your model and how to avoid common problems like Overfitting.

Chapter 21

This is the last chapter of this book. Chris closes this amazing book and teaches you how to save your models for further use. You are creating your model for a reason so you will need to learn how to transfer your models from place to place.

Closing the Review

I loved that book! It was amazing, easy to read and follow along. It presents a ton of examples with code where you can follow along with your computer and walks you through the fundamental of Machine Learning. It’s been more than one month since I’ve finished this book and I always catch myself searching for stuff into it! It is a great guide for a Data Scientist that lists the most popular models and brings you up to speed on methods and techniques that you haven’t touch in a long time.

I totally recommend this book to every data scientist! This book is also amazing for someone that has some knowledge in the field and wants to go a step further. A big bravo to Chris for this amazing book! Keep up the good work!

That’s it for today!  I know that is a different post than the others but I hope you like it! Please let me know for any questions you have and also your opinion for these kinds of posts. Do you want me to do more reviews? You can always find me on Twitter @siaterliskonsta or in the comment section below! Don’t forget to follow and subscribe to my blog, I post weekly about data science and Python. Till next time, take care and bye bye!