Review of Python Machine Learning
The following is a review of the book Python Machine Learning: Machine Learning and Deep Learning with Python, scikit-learn, and TensorFlow 2, 3rd Edition by Sebastian Rashcka. (Twitter account here)
After learning the basic theoretical concepts about Machine Learning, many newcomers to the field wonder lost for a while, not knowing how to translate what they have learned about the fundamentals and different algorithms into tangible assets or solutions. They understand the theoretical concepts well, but struggle transforming this theoretical knowledge into real projects or applications.
Building Machine Learning applications is a task that falls into the realm of Software engineering and Computer Science. To do it well, you need to be able to code in the best possible manner. We’re not talking here about being an expert software developer, but at least being able to program clean and efficient code, understanding every step of the process and how the theory that you have learned underlies the specific programming.
This book will cover and get you confortable with the main building blocks of the Machine Learning practice: it will teach you to take your theory one step further, it will teach you to implement. Reading it will allow you to translate your the theoretical knowledge into small, contained projects, that can then be upgraded to applications of some sort.
The book is ‘Python Machine Learning’ by Sebastian Raschka and Vahid Mirjalili. We recommend reading it after “Hands-On Machine Learning with Scikit-Learn & TensorFlow”, and with these two combined, and some very introductory Python and Machine Learning courses you will be more than confident to start building your own portfolio of projects.
Building projects with a solid theoretical and practical background was the most challenging, but at the same time the most rewarding step of the Data Science learning process, but that is meat for another post.
For now, lets see how this book can become one of your best allies to reach the point where you can start thinking about creating by yourself.
Who is this book for?
This book, from our point of view is for those who already have a good grasp of Machine Learning, that also have previous Python experience, and that want to learn how to put their theoretical machine learning knowledge into practice, by coding the different algorithms and learning about data cleaning and preparation.
If you are a complete beginner on Machine Learning, you’ll get the big picture, however it is up to you to go deeper on each concept and to fully investigate and understand the algorithms under the hood.
Because of this we think it is best to have a good understanding of the theory, from online courses maybe or previous books like Hands-On Machine Learning with Scikit-Learn & TensorFlow, or The 100 page Machine Learning Book and then reading a book like this to learn how to translate this knowledge into practice, rather than the other way around.
What does it include?
As briefly described before, each chapter contains theoretical explanations of the topics covered in such chapter, along with demonstration code that is also explained. The authors go into the detail of what each new line of code does, the different libraries used, and the things to watch out for. The code is proficiently explained, so that you can get the best possible results with your implementations.
Raschka’s book hits the sweet-spot between a programming cookbook full of code examples and recipes and a theoretical book full of theorems and demonstrations. It has a stable balance between light theoretical concepts and how to take them to practice, alternating explanations, formulas and very clear images with code blocks and examples.
The contents of the book, can be described with the following sentence:
While it does not dive very deep into the theory, it provides enough detail to know what is happening and understanding it well. For deeper insights into the theory we probably need another book or course, however, Python Machine Learning presents an efficient and profesional way of coding in Python with detailed code explanations that are not seen very much elsewhere.
The chapters of the book are the following:
- Chapter 1: Giving Computers the Ability to Learn from Data.
- Chapter 2 : Training simple Machine Learning Algorithms.
- Chapter 3 : A Tour of Machine Learning Classifiers using Scikit-learn.
- Chapter 4 : Building good training sets — Data Preprocessing.
- Chapter 5 : Compressing data via Dimensionality reduction
- Chapter 6 : Learning best practices for Model Evaluation and Hyper-parameter tuning.
- Chapter 7 : Combining different models for ensemble learning.
- Chapter 8 : Applying Machine Learning to sentiment analysis.
- Chapter 9 : Embedding a Machine Learning Model in a web application.
- Chapter 10: Predicting continuous Target Variables with regression analysis.
- Chapter 11 : Working with Unlabelled Data — Clustering Analysis.
- Chapter 12 : Implementing a Multilayer Artificial Neural Network from Scratch.
- Chapter 13 : Parallelizing Neural Network Training with Tensorflow
- Chapter 14 : Going Deeper — The Mechanics of Tensorflow
- Chapter 15 : Classifying Images with Deep Convolutional Neural Networks.
- Chapter 16 : Modelling Sequential Data Using Recurrent Neural Networks.
Chapters from 1 to 5 introduce you to the main concepts of Machine Learning, and teach you how to implement different kinds of Machine Learning algorithms, and pre-process data in an elegant and efficient manner, do feature selection, and regularisation. Lastly PCA, LDA and other dimensionality reduction techniques are covered.
Chapter 6 on Learning Best Practices and Model evaluation was a total gem for me. It talks about how to properly implement and do model debugging, and parameter selection, along with the theory of the different metrics involved in the process explained in a concise and procedural manner.
Chapters 8 and 9 are very practical, getting us to learn how to put a Machine Learning model inside a web application to which we can throw requests and get predictions as answers.
Chapters 10 and 11 are about regression and clustering. Linear and non-linear regression are covered, along with their performance metrics, and Random Forest Regression. K-means, hierarchical clustering and silhouette diagrams are explained in chapter 11.
To end, chapters from 12 to 16 cover Neural Networks with Tensorflow in a very detailed practical manner. You will fully understand how Tensorflow works, and be able to implement your own Artificial Neural Networks.
Each chapter ends with a summary of the topics that have been explained, and how they fit in the Machine Learning framework, however, one thing I missed were questions or exercises to evaluate how well the contents of the book had been understood.
However, there is a GitHub repository with the code used in each of the chapters and further explanations. Also, you can find the authors official website and the description of Python Machine Learning here.
How to read this book?
This is our personal view, but for us, as if you already know the theory behind the Machine Learning algorithms out there, and you are more interested in the implementation, we would recommend a read and code approach. Have the book with a laptop by my your side code along while reading.
This will allow you to experiment with different parameters for example, or try different variants of the proposed code, developing a more profound understanding that if you only read the book and take notes. This also means that you will build a series of very useful scripts (data cleaning scripts for example, or code to build a correlation matrix) that you can then use as plug and play blocks, saving a lot of time for future projects.
What Impact will this book have on me?
If you are new to Machine Learning, this book will get you familiar with the theory behind it, while getting your practical expertise on implementing Machine Learning models and pipelines to a very decent level. By the end of it you will be able to build your own Machine Learning projects and start a portfolio.
If you already know the theory, this book will round up your knowledge and get you very comfortable with implementing it. If you already know how to implement and build ML products, you will learn neat tips and tricks to improve them.
Overall, anyone who is not an expert in Machine Learning implementations will gain something from reading this book.
What to do next?
After you have finished this book we would encourage you to think of a couple of projects you would like to do with Machine Learning and with the book by your side, try to execute them.
This will test you on real world problems, make you face some of the difficulties of Machine Learning projects, and also you will be building a portfolio of solved problems that will be of high value in your learning and in your future as a Machine Learning engineer or Data Scientist.
If you are not already very confortable with the theory behind Machine Learning, or want to learn more, we would recommend you read one of the following books, or take one of the following online-courses:
- The 100 page Machine Learning Book
- Hands-On Machine Learning with Scikit-Learn & Tensorflow.
- Deep Learning with Python by Francois Chollet.
- Coursera: Machine Learning by Andrew Ng
- Complexity Explorer: Fundamentals of Machine Learning
- Udemy: Python for Data Science and Machine Learning Bootcamp.
For other great Machine Learning book reviews, check out our Machine Learning books category, or if you are interested in less technical books and want to explore the curiosities, dangers, and reach of Artificial Intelligence, you could read one of the books described in our Artificial Intelligence books category.
Summary of Python Machine Learning
As always, we hope you enjoyed the post, and that I have convinced you to read the book. You can buy it on Amazon here:
Python Machine Learning
- Raschka, Sebastian (Author)
- English (Publication Language)
- 770 Pages - 12/12/2019 (Publication Date) - Packt Publishing (Publisher)
Thank you very much for reading How to Learn Machine Learning, and have an awesome day!