Book description
Author Yuxi (Hayden) Liu teaches machine learning from the fundamentals to building NLP transformers and multimodal models with best practice tips and real-world examples using PyTorch, TensorFlow, scikit-learn, and pandas
Key Features
- Discover new and updated content on NLP transformers, PyTorch, and computer vision modeling
- Includes a dedicated chapter on best practices and additional best practice tips throughout the book to improve your ML solutions
- Implement ML models, such as neural networks and linear and logistic regression, from scratch
- Purchase of the print or Kindle book includes a free PDF copy
Book Description
The fourth edition of Python Machine Learning By Example is a comprehensive guide for beginners and experienced machine learning practitioners who want to learn more advanced techniques, such as multimodal modeling. Written by experienced machine learning author and ex-Google machine learning engineer Yuxi (Hayden) Liu, this edition emphasizes best practices, providing invaluable insights for machine learning engineers, data scientists, and analysts.
Explore advanced techniques, including two new chapters on natural language processing transformers with BERT and GPT, and multimodal computer vision models with PyTorch and Hugging Face. You’ll learn key modeling techniques using practical examples, such as predicting stock prices and creating an image search engine.
This hands-on machine learning book navigates through complex challenges, bridging the gap between theoretical understanding and practical application. Elevate your machine learning and deep learning expertise, tackle intricate problems, and unlock the potential of advanced techniques in machine learning with this authoritative guide.
What you will learn
- Follow machine learning best practices throughout data preparation and model development
- Build and improve image classifiers using convolutional neural networks (CNNs) and transfer learning
- Develop and fine-tune neural networks using TensorFlow and PyTorch
- Analyze sequence data and make predictions using recurrent neural networks (RNNs), transformers, and CLIP
- Build classifiers using support vector machines (SVMs) and boost performance with PCA
- Avoid overfitting using regularization, feature selection, and more
Who this book is for
This expanded fourth edition is ideal for data scientists, ML engineers, analysts, and students with Python programming knowledge. The real-world examples, best practices, and code prepare anyone undertaking their first serious ML project.
Table of contents
- Preface
- Getting Started with Machine Learning and Python
- Building a Movie Recommendation Engine with Naïve Bayes
-
Predicting Online Ad Click-Through with Tree-Based Algorithms
- A brief overview of ad click-through prediction
- Getting started with two types of data – numerical and categorical
- Exploring a decision tree from the root to the leaves
- Implementing a decision tree from scratch
- Implementing a decision tree with scikit-learn
- Predicting ad click-through with a decision tree
- Ensembling decision trees – random forests
- Ensembling decision trees – gradient-boosted trees
- Summary
- Exercises
- Join our book’s Discord space
-
Predicting Online Ad Click-Through with Logistic Regression
- Converting categorical features to numerical – one-hot encoding and ordinal encoding
- Classifying data with logistic regression
-
Training a logistic regression model
- Training a logistic regression model using gradient descent
- Predicting ad click-through with logistic regression using gradient descent
- Training a logistic regression model using stochastic gradient descent (SGD)
- Training a logistic regression model with regularization
- Feature selection using L1 regularization
- Feature selection using random forest
- Training on large datasets with online learning
- Handling multiclass classification
- Implementing logistic regression using TensorFlow
- Summary
- Exercises
- Join our book’s Discord space
-
Predicting Stock Prices with Regression Algorithms
- What is regression?
- Mining stock price data
- Getting started with feature engineering
- Estimating with linear regression
- Estimating with decision tree regression
- Implementing a regression forest
- Evaluating regression performance
- Predicting stock prices with the three regression algorithms
- Summary
- Exercises
- Join our book’s Discord space
- Predicting Stock Prices with Artificial Neural Networks
- Mining the 20 Newsgroups Dataset with Text Analysis Techniques
- Discovering Underlying Topics in the Newsgroups Dataset with Clustering and Topic Modeling
-
Recognizing Faces with Support Vector Machine
- Finding the separating boundary with SVM
- Classifying face images with SVM
- Estimating with support vector regression
- Summary
- Exercises
- Join our book’s Discord space
-
Machine Learning Best Practices
- Machine learning solution workflow
- Best practices in the data preparation stage
-
Best practices in the training set generation stage
- Best practice 6 – Identifying categorical features with numerical values
- Best practice 7 – Deciding whether to encode categorical features
- Best practice 8 – Deciding whether to select features and, if so, how to do so
- Best practice 9 – Deciding whether to reduce dimensionality and, if so, how to do so
- Best practice 10 – Deciding whether to rescale features
- Best practice 11 – Performing feature engineering with domain expertise
- Best practice 12 – Performing feature engineering without domain expertise
- Best practice 13 – Documenting how each feature is generated
- Best practice 14 – Extracting features from text data
- Best practices in the model training, evaluation, and selection stage
- Best practices in the deployment and monitoring stage
- Summary
- Exercises
- Join our book’s Discord space
-
Categorizing Images of Clothing with Convolutional Neural Networks
- Getting started with CNN building blocks
- Architecting a CNN for classification
- Exploring the clothing image dataset
- Classifying clothing images with CNNs
- Boosting the CNN classifier with data augmentation
- Improving the clothing image classifier with data augmentation
- Advancing the CNN classifier with transfer learning
- Summary
- Exercises
- Join our book’s Discord space
-
Making Predictions with Sequences Using Recurrent Neural Networks
- Introducing sequential learning
- Learning the RNN architecture by example
- Training an RNN model
- Overcoming long-term dependencies with LSTM
- Analyzing movie review sentiment with RNNs
- Revisiting stock price forecasting with LSTM
- Writing your own War and Peace with RNNs
- Summary
- Exercises
- Join our book’s Discord space
- Advancing Language Understanding and Generation with the Transformer Models
- Building an Image Search Engine Using CLIP: a Multimodal Approach
-
Making Decisions in Complex Environments with Reinforcement Learning
- Setting up the working environment
- Introducing OpenAI Gym and Gymnasium
- Introducing reinforcement learning with examples
- Solving the FrozenLake environment with dynamic programming
- Performing Monte Carlo learning
- Solving the Blackjack problem with the Q-learning algorithm
- Summary
- Exercises
- Join our book’s Discord space
- Other Books You May Enjoy
- Index
Product information
- Title: Python Machine Learning By Example - Fourth Edition
- Author(s):
- Release date: July 2024
- Publisher(s): Packt Publishing
- ISBN: 9781835085622
You might also like
book
Python Machine Learning - Third Edition
Applied machine learning with a solid foundation in theory. Revised and expanded for TensorFlow 2, GANs, …
book
Introduction to Machine Learning with Python
Machine learning has become an integral part of many commercial applications and research projects, but this …
book
Machine Learning with Python Cookbook, 2nd Edition
This practical guide provides more than 200 self-contained recipes to help you solve machine learning challenges …
book
Machine Learning Engineering with Python - Second Edition
Transform your machine learning projects into successful deployments with this practical guide on how to build …