Machine Learning with Pytorch and Scikit-Learn

Machine learning with Pytorch and Scikit-learn

The following is a review of the book Machine Learning with PyTorch and Scikit-Learn: Develop machine learning and deep learning models with Python by y Sebastian Raschka, author of one of our favourite Machine Learning books Python Machine Learning: Machine Learning and Deep Learning with Python, scikit-learn, and TensorFlow 2 for which you can find a review here: Python Machine Learning book review.

Review of Machine Learning with PyTorch and Scikit-learn

Machine Learning with Pytorch and Scikit-learn is a book that covers the core concepts of Machine Learning going in depth into specific frameworks or libraries like Pytorch and Scikit-learn, and also adds a couple of concepts that are not commonly covered in these kind of texts like Graph Neural Networks (GNNs) and Q-learning.

It is a long and magnificent text that covers everything in detail, provides very illustrative figures, and amazingly comprehensive Python code snippets. Also, if you find yourself craving more content on a specific topic there are a ton of references and additional resources to follow outlined in Machine Learning with Pytorch and Scikit-Learn.

We think that this book is a great start for those persons that want to better understand the field of applied Machine Learning, and also a fantastic way for those that already have some experience to brush up and update their knowledge.

Content of Machine Learning with Pytorch and Scikit-learn

The book has 19 chapters leading to a total of 700 pages. These chapters go from very basic Machine Learning concepts to detailed explanations of complex architectures. Lets see them in detail:

  • Chapter 1 – Giving Computers the Ability to Learn from Data: this first chapter is an introduction to Machine Learning, the main types of tasks (Supervised, Unsupervised, and Reinforcement Learning) and the different steps that are necessary to solve a machine learning problem.
  • Chapter 2 – Training Machine Learning Algorithms for Classification: this chapter goes to the very origins of neural networks, explaining the concept of the Perceptron first coined by Frank Rosenblatt, and its application in binary classification, alongside with an explanation of how optimisation algorithms lie at the core of machine learning.
  • Chapter 3 – A Tour of Machine Learning Classifiers using Scikit-learn: an overview of the main machine learning algorithms use for classification and how to implement them using one of the most renowned frameworks for these kind of problems: Scikit-learn. You can learn all about this framework with our article: What is Scikit-learn?
  • Chapter 4 – Building Good Training Datasets – Data Preprocessing: this chapter is a gem. Data pre-processing is one of the most, if not the most important part of any machine learning pipeline. This chapter explains how to handle your raw dataset, solve the problem of missing data, etc, and also discusses several ways to identify the best features of your data and how to best prepare your variables for ML algorithms.
  • Chapter 5 – Compressing Data via Dimensionality Reduction: another highly important part that comes before building your ML models is reducing the number of features in your dataset while keeping the most information. This chapter covers just how to do this and dives into Principal Component Analysis (PCA), one of the main techniques.
  • Chapter 6 – Learning Best Practices for Model Evaluation and Hyperparameter Turning: this chapter explains how to evaluate our Machine learning models using different techniques and metrics.
  • Chapter 7 – Combining Different Models for Ensemble Learning: the different concepts of behind the logic of combining different models using ensembles (bagging/boosting) to overcome the weaknesses of individual models and improve model performance.
  • Chapter 8 – Applying Machine Learning to Sentiment Analysis: an explanation of how to analyse text and predict the sentiment it using sentiment analysis, one of the main applications of Natural Language Processing (NLP)
  • Chapter 9 – Predicting Continuous Target Variables with Regression Analysis: this chapter of Machine Learning with Pytorch and Scikit-learn speaks about the different kinds of models to use for solving regression tasks.
  • Chapter 10 – Working with Unlabeled Data – Clustering Analysis: an overview the three main families of unsupervised learning algorithms that are used for clustering analysis.
  • Chapter 11 – Implementing a Multilayer Artificial Neural Network from Scratch: an extension of Chapter 2 to build more complex neural architectures, and the backpropagation algorithm in Python.
  • Chapter 12 – Parallelizing Neural Network Training with Pytorch: a practical guide for training ANN using Pytorch, one of the most famous Python frameworks for Deep Learning.
  • Chapter 13 – Going Deeper – The Mechanics of Pytorch: a deeper overview (of deep learning 😛 ?) of the previous framework, with through explanations of its details and how to make the best of it to create amazing Artificial Neural Networks.
  • Chapter 14 – Classifying Images with Deep Convolutional Neural Networks: is the first explanation in the text of the most known neural architecture for any tasks that involves images like photos or videos and any other sort of Computer Vision problem.
  • Chapter 15 – Modelling Sequential Data using Recurrent Neural Networks: another great neural architecture, but this time for operating with sequential data like time series or text: Recurrent Neural Networks or RNNs.
  • Chapter 16 – Transformers – Improving Natural Language Processing with Attention Mechanisms: this chapter dives into one of the neural architectures that has allowed NLP to evolve to where it has and the main concept at its core: Transformers and Attention. You can learn all about these two in 5 minutes with the following article: Deep Learning for NLP – Transformers explained.
  • Chapter 17 – Generative Adversarial Neural Networks for Synthesizing New Data: this chapter of Machine Learning with Pytorch and Scikit-Learn covers the family of models that is used for generating the famous Deep Fakes – Generative Artificial Neural Networks or GANs.
  • Chapter 18 – Graph Neural Networks for Capturing Dependencies in Graph Structured Data: An explanation of a very exciting family of neural networks that can implicitely model relationships in between in the entities within a dataset – Graph Neural Networks or GNNs.
  • Chapter 19 – Reinforcement Learning for Decision Making in Complex Environments: this chapter covers the main concepts of he last non-covered family of Machine learning models (Reinforcement Learning) and an explanation of the Q-learning algorithm.

As you can see it is a really extensive book that covers a ton of material. Because of this depth, the quality and structure of the content, and the amazing code it includes we think that it is definitely a text that all Machine Learning enthusiasts should have in their library.

Lets see who Machine Learning with Pytorch and Scikit-learn is for, and how we would recommend reading it!

Who this book is for?

This book is the ideal companion for learning how to apply machine learning and deep learning to a wide range of tasks and datasets. If you are a programmer who wants to keep up with the recent trends in technology, this book is definitely for you. Also, if you are a student or considering a career transition, this book will be both your introduction and a comprehensive guide to the world of machine learning

This is an extract from the actual book that summarises the objective public. We think that any technical person with coding knowledge could pick up this book and become versed in the world of Machine Learning.

Having previous Python and Machine learning knowledge (basic, not being an expert) will lead you to making the most out of it, allowing you to improve both your theoretical knowledge and practical skills, which at the end of the day is the most important facet of this world: ML only provides value if it is out there, implemented in some kind of application in the real world, and this book is great for learning the first steps of how to do that.

If you are not familiar with Python programming don’t worry, we got you covered. Check out our awesome list of reviewed Python books and our Python online courses.

How to get the most out of this book

As with most books of this sort, that cover technical concepts and their implementation, we suggest a code-as-yo-go approach, trying out the different code snippets in each section, coding them line by line to understand them better, and even making tweaks.

This is not only useful in your learning path with Machine Learning with Pytorch and Scikit-learn, but after reading the book using this methodology you will find yourself having a wide range of highly useful and reusable code-snippets for your day to day work.

One thing that we like to see in books of this sort are questions at the end of each chapter to answer in order to consolidate our knowledge of the covered materials. Machine learning with Pytorch and Scikit-learn does not include these exercises, but it is common in most books that are so hands-on.

To cover this, we recommend building projects as you go – for example, after the classification chapter, try out different classification algorithms on a chosen dataset. Do the same after regression, and even try to use the tools learned in the book to make a cool Natural Language or Computer Vision model.

The possibilities are endless!


Machine Learning with Pytorch and Scikit-learn by Sebastian Raschka et al is a great book to learn how to code and get familiar with introductory and advanced implementations of Machine Learning algorithms in Python. Specially, it covers the great Pytorch library for building Artificial Neural Networks.

It covers Machine learning theory and practice in a delightful manner, with wonderful illustrations and fantastic code snippets. If you are tired of line after line of text and mathematical formulas, and you are looking for something more hands-on then this is the book for you!

As always, we hope you enjoyed the post, and that we have convinced you to read the book. You can buy it on Amazon here:

Machine Learning with PyTorch and Scikit-Learn: Develop machine learning and deep learning models with Python
  • Raschka, Sebastian (Author)
  • English (Publication Language)
  • 774 Pages - 02/25/2022 (Publication Date) - Packt Publishing (Publisher)

For more content, check out our following book reviews and online Machine Learning courses:

Book reviews:


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.