Python Machine Learning by Example : Build intelligent systems using Python, TensorFlow 2, PyTorch, and scikit-learn, 3/e

Liu, Yuxi (Hayden)



A comprehensive guide to get you up to speed with the latest developments of practical machine learning with Python and upgrade your understanding of machine learning (ML) algorithms and techniques

Key Features

  • Dive into machine learning algorithms to solve the complex challenges faced by data scientists today
  • Explore cutting edge content reflecting deep learning and reinforcement learning developments
  • Use updated Python libraries such as TensorFlow, PyTorch, and scikit-learn to track machine learning projects end-to-end

Book Description

Python Machine Learning By Example, Third Edition serves as a comprehensive gateway into the world of machine learning (ML).

With six new chapters, on topics including movie recommendation engine development with Naive Bayes, recognizing faces with support vector machine, predicting stock prices with artificial neural networks, categorizing images of clothing with convolutional neural networks, predicting with sequences using recurring neural networks, and leveraging reinforcement learning for making decisions, the book has been considerably updated for the latest enterprise requirements.

At the same time, this book provides actionable insights on the key fundamentals of ML with Python programming. Hayden applies his expertise to demonstrate implementations of algorithms in Python, both from scratch and with libraries.

Each chapter walks through an industry-adopted application. With the help of realistic examples, you will gain an understanding of the mechanics of ML techniques in areas such as exploratory data analysis, feature engineering, classification, regression, clustering, and NLP.

By the end of this ML Python book, you will have gained a broad picture of the ML ecosystem and will be well-versed in the best practices of applying ML techniques to solve problems.

What you will learn

  • Understand the important concepts in ML and data science
  • Use Python to explore the world of data mining and analytics
  • Scale up model training using varied data complexities with Apache Spark
  • Delve deep into text analysis and NLP using Python libraries such NLTK and Gensim
  • Select and build an ML model and evaluate and optimize its performance
  • Implement ML algorithms from scratch in Python, TensorFlow 2, PyTorch, and scikit-learn

Who this book is for

If you're a machine learning enthusiast, data analyst, or data engineer highly passionate about machine learning and want to begin working on machine learning assignments, this book is for you.

Prior knowledge of Python coding is assumed and basic familiarity with statistical concepts will be beneficial, although this is not necessary.


Yuxi (Hayden) Liu is a machine learning software engineer at Google. Previously he worked as a machine learning scientist in a variety of data-driven domains and applied his machine learning expertise in computational advertising, marketing, and cybersecurity.

Hayden is the author of a series of machine learning books and an education enthusiast. His first book, the first edition of Python Machine Learning By Example, was ranked the #1 bestseller in its category on Amazon in 2017 and 2018 and was translated into many languages. His other books include R Deep Learning Projects, Hands-On Deep Learning Architectures with Python, and PyTorch 1.x Reinforcement Learning Cookbook.


  1. Getting Started with Machine Learning and Python
  2. Building a Movie Recommendation Engine with Naive Bayes
  3. Recognizing Faces with Support Vector Machine
  4. Predicting Online Ad Click-Through with Tree-Based Algorithms
  5. Predicting Online Ad Click-Through with Logistic Regression
  6. Scaling Up Prediction to Terabyte Click Logs
  7. Predicting Stock Prices with Regression Algorithms
  8. Predicting Stock Prices with Artificial Neural Networks
  9. Mining the 20 Newsgroups Dataset with Text Analysis Techniques
  10. Discovering Underlying Topics in the Newsgroups Dataset with Clustering and Topic Modeling
  11. Machine Learning Best Practices
  12. Categorizing Images of Clothing with Convolutional Neural Networks
  13. Making Predictions with Sequences Using Recurrent Neural Networks
  14. Making Decisions in Complex Environments with Reinforcement Learning