No. 197 of 500 No. 25 in Hands-On AI & Programming

Machine Learning with PyTorch and Scikit-Learn

Develop machine learning and deep learning models with Python

By Sebastian Raschka, Yuxi (Hayden) Liu and Vahid Mirjalili

Print length
770 pages
Publisher
Packt Publishing
Reading level
Intermediate
ISBN-13
978-1801819312
Published
February 25, 2022
Written for
Python programmers, data science students and analysts wanting a rigorous, code-first path from classical ML to deep learning.

Synopsis

This book began life as the fourth edition of Sebastian Raschka's Python Machine Learning and was retitled because the changes ran so deep. It keeps that series' structure: the first ten chapters cover classical machine learning with scikit-learn, from perceptrons and logistic regression through data preprocessing, dimensionality reduction, model evaluation, hyperparameter tuning, ensemble methods including gradient boosting and XGBoost, regression and clustering. Chapter 11 then builds a multilayer neural network from scratch in NumPy so the reader sees backpropagation without a framework hiding the mechanics.

The second half switches to PyTorch, replacing the TensorFlow code of earlier editions, and adds PyTorch Lightning. Chapters cover convolutional networks for images, recurrent networks for sequences, attention and transformers for language, generative adversarial networks, graph neural networks and reinforcement learning. Each topic pairs explanation and equations with runnable code, and the notebooks and color figures live in a public GitHub repository. Readers who work through it gain a durable mental model of the full workflow, from preparing data to training and evaluating deep models. At more than 770 pages it rewards steady study rather than skimming, and its transformer material predates the ChatGPT era of large language models.

Scorecard

Editorial score

How it scored

Editorial score: 79.6 / 1005 weighted criteria

  • Influence30%

    24.0/30
  • Authority25%

    21.3/25
  • Practical value20%

    17.0/20
  • Currency15%

    9.8/15
  • Readability10%

    7.5/10
  • Editorial score

    79.6/100

How the rank was computed

Rank No. 197 of 500 comes from a composite of 56.8: observable signals 20.9 of 55 points plus editorial review 35.9 of 45 points.

All 11 inputs
InputPoints
Observable signals20.9/55
Reach (Amazon ratings volume)10.0/16.5
Consensus across best-of lists2.8/13.8
Awards and bestseller evidence0.0/8.3
Reader rating, sample-adjusted6.7/8.3
Amazon sales rank1.4/5.5
Recency0.0/2.8
Editorial review35.9/45
Author authority9.6/11.3
Influence10.8/13.5
Practical value7.7/9.0
Readability3.4/4.5
Currency4.4/6.8

Each criterion is scored from 1 to 10 and weighted, and the points add up to the editorial score. The rank combines observable signals (55 percent) with this score (45 percent). Read the methodology.

Verdict

One of the most complete practitioner courses in Python machine learning, pairing sound theory with working scikit-learn and PyTorch code.

Strengths

  • Theory and code explained side by side
  • Broad coverage from scikit-learn to GNNs
  • Free notebooks and color figures on GitHub

Keep in mind

Its length and math demand sustained effort, and the 2022 transformer chapter, built around BERT-era models, predates instruction-tuned LLMs, retrieval and agents.

Key takeaways

  1. Implementing a neural network and backpropagation in plain NumPy before using a framework builds intuition that makes PyTorch code far easier to debug.
  2. Data preprocessing, feature scaling and careful train-test splits often matter as much to model quality as the choice of algorithm.
  3. Cross-validation, learning curves and systematic hyperparameter search, including randomized search, are the reliable ways to diagnose overfitting and compare models.
  4. Tree ensembles such as gradient boosting and XGBoost remain strong baselines for tabular data, while deep networks earn their cost on images, text and graphs.

Notable facts

  • The book started as the fourth edition of Python Machine Learning and was renamed because of the extent of the changes, including the move from TensorFlow to PyTorch. Source (opens in a new tab)
  • Translated into Japanese (Impress Top Gear) and Serbian (Kompjuter Biblioteka) in 2022. Source (opens in a new tab)

About the author

Sebastian Raschka, Yuxi (Hayden) Liu and Vahid Mirjalili

Sebastian Raschka, PhD, is an LLM research engineer who has been a senior engineer at Lightning AI and a statistics professor at the University of Wisconsin–Madison. He wrote the Python Machine Learning series, which this book succeeds, and Build a Large Language Model (From Scratch). Co-author Yuxi (Hayden) Liu led the code's transition to PyTorch; Vahid Mirjalili co-wrote earlier editions of the series.

Questions

What is Machine Learning with PyTorch and Scikit-Learn about?
It is a comprehensive, code-driven course in machine learning with Python. The first half teaches classical methods with scikit-learn, including preprocessing, model evaluation, ensembles, regression and clustering. The second half moves to deep learning with PyTorch, covering convolutional and recurrent networks, transformers, GANs, graph neural networks and reinforcement learning, all with runnable code.
Who should read Machine Learning with PyTorch and Scikit-Learn?
Programmers comfortable with Python and some algebra who want to understand and build machine learning models will get the most from it. It also works as a course text for advanced undergraduates or graduate students. Complete programming beginners should learn Python first, and readers focused only on large language models may prefer a newer, LLM-specific title.
Is Machine Learning with PyTorch and Scikit-Learn still relevant in 2026?
Largely, yes. Scikit-learn and PyTorch remain standard tools, and the fundamentals it teaches, from preprocessing and validation to backpropagation and convolutional networks, have not changed. The main gap is recent generative AI practice: instruction-tuned models, retrieval-augmented generation and agents spread after its 2022 publication, so pair it with a current LLM resource.

Sources

As an Amazon Associate, Best AI Books earns from qualifying purchases. Best AI Books is sponsored by Iternal.ai, whose founder and CEO, John Byron Hanby IV, wrote The AI Strategy Blueprint, our #1 ranked book. How we rank books.