Cover of Hands-On Machine Learning with Scikit-Learn, Keras, and TensorFlow by Aurélien Géron, featuring abstract circuit-like network patterns

Pages

877

Published

2022

AI Learning ✨ New

Hands-On Machine Learning with Scikit-Learn, Keras, and TensorFlow

A practical, project-driven introduction to machine learning and deep learning with Python

Build and train real machine learning and deep learning models from scratch using Scikit-Learn, Keras, and TensorFlow — without losing the theory that makes them work.

Aurélien Géron's hands-on approach strips away the abstraction that makes machine learning feel out of reach. Across 877 pages, you'll move from foundational supervised and unsupervised learning through to building, training, and deploying deep neural networks. Every concept is grounded in working Python code, so you never just read about a technique — you implement it. If you want to go from capable developer to practicing ML engineer, this is the book that gets you there.

About this book

Most machine learning books split into two camps: dense academic theory with no code, or shallow tutorials that skip the reasoning behind every decision. This book refuses both extremes. Aurélien Géron builds your intuition for why algorithms work the way they do, then immediately puts that intuition to work in Python.

The first half covers classical machine learning with Scikit-Learn: linear and logistic regression, decision trees, random forests, support vector machines, and clustering. You'll learn how to frame a problem, select a model, evaluate it honestly, and tune it for production — not just notebook accuracy.

The second half moves into deep learning with Keras and TensorFlow. You'll build feedforward networks, convolutional networks for vision tasks, recurrent networks for sequences, and generative models. Each chapter introduces new architecture concepts through a concrete project, so you always know what you're building and why.

Key areas covered throughout the book include:

  • End-to-end project workflow: data collection, cleaning, feature engineering, training, and evaluation
  • Regularization, hyperparameter tuning, and avoiding overfitting in practice
  • Training deep networks that actually converge: initialization, batch normalization, and gradient clipping
  • Custom training loops, callbacks, and saving models for deployment with TensorFlow SavedModel
  • Computer vision with CNNs: object detection, semantic segmentation, and transfer learning
  • Sequence modeling with RNNs, LSTMs, and Transformers for NLP tasks
  • Generative adversarial networks and variational autoencoders
  • Scaling training across GPUs and distributed TensorFlow strategies

The code targets Python 3, Scikit-Learn 1.x, and TensorFlow 2.x. Every chapter ships with Jupyter notebooks you can run immediately, so the gap between reading and doing stays as small as possible.

Whether you are a software engineer making your first serious investment in ML or an analyst who has run models but never built one from weights up, this book gives you the vocabulary, the code patterns, and the confidence to work on real problems.

🎯 What you'll learn

  • Frame any supervised or unsupervised learning problem and choose an appropriate algorithm for it
  • Build, evaluate, and tune Scikit-Learn pipelines that generalize beyond your training data
  • Construct and train deep neural networks with Keras using both the Sequential and Functional APIs
  • Apply convolutional neural networks to image classification, detection, and segmentation tasks
  • Model sequential data with RNNs, LSTMs, and attention-based Transformers
  • Train generative models including GANs and variational autoencoders
  • Scale training across multiple GPUs using TensorFlow's distributed strategy APIs
  • Export and serve trained models in production-ready TensorFlow SavedModel format

👤 Who is this book for?

  • Software engineers who know Python and want a rigorous, practical path into machine learning and deep learning
  • Data analysts who have used ML libraries but want to understand what is happening beneath the API surface
  • Computer science students looking for a project-driven complement to a formal ML course
  • Backend or data engineers tasked with building or maintaining ML pipelines who need to close their knowledge gaps fast
  • Researchers from adjacent fields who need to apply neural networks and want working code alongside the concepts

Table of contents

  1. 01

    The Machine Learning Landscape

    Survey the types of machine learning systems and the core terminology you will use throughout the book. Understand when to reach for supervised, unsupervised, or reinforcement learning and what traps catch beginners.

  2. 02

    End-to-End Machine Learning Project

    Walk through a complete housing-price prediction project from raw data to a deployed model. You'll practice every stage — data exploration, cleaning, feature engineering, model selection, and evaluation — in one cohesive workflow.

  3. 03

    Classification

    Build binary and multiclass classifiers and learn how to measure their performance honestly using confusion matrices, precision-recall curves, and ROC curves. You'll see why accuracy alone is a dangerous metric.

  4. 04

    Training Models

    Derive and implement linear regression and logistic regression from first principles, then connect gradient descent, the normal equation, and regularization into a unified picture you can apply to any model.

  5. 05

    Support Vector Machines

    Train linear and kernel SVMs for classification and regression tasks. You'll understand the margin intuition, the kernel trick, and how to tune SVMs without getting lost in the math.

  6. 06

    Decision Trees and Ensemble Methods

    Grow decision trees, then combine them into random forests and gradient-boosted ensembles. You'll tune ensemble hyperparameters and learn why bagging and boosting reduce variance and bias in different ways.

  7. 07

    Dimensionality Reduction and Unsupervised Learning

    Reduce high-dimensional data with PCA and other techniques, then cluster unlabeled datasets with K-Means and DBSCAN. You'll learn to evaluate clustering quality without ground-truth labels.

  8. 08

    Introduction to Neural Networks with Keras

    Build your first feedforward neural networks using Keras's Sequential and Functional APIs. You'll train them on real datasets, add regularization, and use callbacks to control the training process.

  9. 09

    Training Deep Neural Networks

    Tackle the practical problems that prevent deep networks from converging: vanishing gradients, poor initialization, and slow optimizers. You'll apply batch normalization, dropout, and advanced optimizers to get stable training.

  10. 10

    Convolutional Neural Networks for Vision

    Implement CNNs for image classification, apply transfer learning from pretrained models, and extend to object detection and semantic segmentation. You'll finish with a working vision pipeline trained on a real image dataset.

  11. 11

    Sequence Modeling with RNNs and Transformers

    Model time-series and text data with RNNs, LSTMs, and attention mechanisms, culminating in a working Transformer implementation. You'll understand when recurrent architectures excel and when attention is the better choice.

  12. 12

    Generative Models and Scaling with TensorFlow

    Train variational autoencoders and GANs to generate new data, then learn to distribute training across GPUs using TensorFlow's strategy API and export finalized models in SavedModel format for deployment.

Frequently asked questions

What Python and library versions does the book target?

The third edition targets Python 3, Scikit-Learn 1.x, and TensorFlow 2.x with Keras integrated. The accompanying Jupyter notebooks are updated to match these versions.

Do I need a machine learning or statistics background before reading this?

No formal ML background is required. You do need solid Python skills and basic high-school-level mathematics. Géron explains the math you need as it arises rather than assuming prior coursework.

Is this book more theory or more code?

It is deliberately both. Each concept is explained intuitively and then implemented in working Python code. You won't find chapters of equations with no runnable examples, nor shallow copy-paste tutorials with no explanation.

Are Jupyter notebooks available for the code examples?

Yes. The author maintains a GitHub repository of Jupyter notebooks that correspond to each chapter. The book directs you to that repository; Bitsfolio does not host the files directly.

Is this suitable for someone who only needs classical ML and not deep learning?

The first half of the book (roughly the first seven chapters) covers classical ML with Scikit-Learn and stands on its own. You can read that section independently if deep learning is not your current focus.

How does this edition differ from the second edition?

The third edition, published in 2022, updates all code to TensorFlow 2 and Keras's modern API, adds coverage of Transformers and attention mechanisms, and refreshes the deployment and scaling chapters to reflect current TensorFlow tooling.

You might also like

📬 Weekly Newsletter

Stay ahead of the curve

Get the best programming tutorials, data analytics tips, and tool reviews delivered to your inbox every week.

No spam. Unsubscribe anytime.