Machine Learning Design Patterns: Solutions to Common Challenges in Data Preparation, Model Building, and MLOps
- Length: 408 pages
- Edition: 1
- Language: English
- Publisher: O'Reilly Media
- Publication Date: 2020-11-03
- ISBN-10: 1098115783
- ISBN-13: 9781098115784
- Sales Rank: #668668 (See Top 100 Books)
The design patterns in this book capture best practices and solutions to recurring problems in machine learning. The authors, three Google engineers, catalog proven methods to help data scientists tackle common problems throughout the ML process. These design patterns codify the experience of hundreds of experts into straightforward, approachable advice.
In this book, you will find detailed explanations of 30 patterns for data and problem representation, operationalization, repeatability, reproducibility, flexibility, explainability, and fairness. Each pattern includes a description of the problem, a variety of potential solutions, and recommendations for choosing the best technique for your situation.
You’ll learn how to:
- Identify and mitigate common challenges when training, evaluating, and deploying ML models
- Represent data for different ML model types, including embeddings, feature crosses, and more
- Choose the right model type for specific problems
- Build a robust training loop that uses checkpoints, distribution strategy, and hyperparameter tuning
- Deploy scalable ML systems that you can retrain and update to reflect new data
- Interpret model predictions for stakeholders and ensure models are treating users fairly
Preface Who Is This Book For? What’s Not in the Book Code Samples Conventions Used in This Book O’Reilly Online Learning How to Contact Us Acknowledgments 1. The Need for Machine Learning Design Patterns What Are Design Patterns? How to Use This Book Machine Learning Terminology Models and Frameworks Data and Feature Engineering The Machine Learning Process Data and Model Tooling Roles Common Challenges in Machine Learning Data Quality Reproducibility Data Drift Scale Multiple Objectives Summary 2. Data Representation Design Patterns Simple Data Representations Numerical Inputs Categorical Inputs Design Pattern 1: Hashed Feature Problem Solution Why It Works Trade-Offs and Alternatives Design Pattern 2: Embeddings Problem Solution Why It Works Trade-Offs and Alternatives Design Pattern 3: Feature Cross Problem Solution Why It Works Trade-Offs and Alternatives Design Pattern 4: Multimodal Input Problem Solution Trade-Offs and Alternatives Summary 3. Problem Representation Design Patterns Design Pattern 5: Reframing Problem Solution Why It Works Trade-Offs and Alternatives Design Pattern 6: Multilabel Problem Solution Trade-Offs and Alternatives Design Pattern 7: Ensembles Problem Solution Why It Works Trade-Offs and Alternatives Design Pattern 8: Cascade Problem Solution Trade-Offs and Alternatives Design Pattern 9: Neutral Class Problem Solution Why It Works Trade-Offs and Alternatives Design Pattern 10: Rebalancing Problem Solution Trade-Offs and Alternatives Summary 4. Model Training Patterns Typical Training Loop Stochastic Gradient Descent Keras Training Loop Training Design Patterns Design Pattern 11: Useful Overfitting Problem Solution Why It Works Trade-Offs and Alternatives Design Pattern 12: Checkpoints Problem Solution Why It Works Trade-Offs and Alternatives Design Pattern 13: Transfer Learning Problem Solution Why It Works Trade-Offs and Alternatives Design Pattern 14: Distribution Strategy Problem Solution Why It Works Trade-Offs and Alternatives Design Pattern 15: Hyperparameter Tuning Problem Solution Why It Works Trade-Offs and Alternatives Summary 5. Design Patterns for Resilient Serving Design Pattern 16: Stateless Serving Function Problem Solution Why It Works Trade-Offs and Alternatives Design Pattern 17: Batch Serving Problem Solution Why It Works Trade-Offs and Alternatives Design Pattern 18: Continued Model Evaluation Problem Solution Why It Works Trade-Offs and Alternatives Design Pattern 19: Two-Phase Predictions Problem Solution Trade-Offs and Alternatives Design Pattern 20: Keyed Predictions Problem Solution Trade-Offs and Alternatives Summary 6. Reproducibility Design Patterns Design Pattern 21: Transform Problem Solution Trade-Offs and Alternatives Design Pattern 22: Repeatable Splitting Problem Solution Trade-Offs and Alternatives Design Pattern 23: Bridged Schema Problem Solution Trade-Offs and Alternatives Design Pattern 24: Windowed Inference Problem Solution Trade-Offs and Alternatives Design Pattern 25: Workflow Pipeline Problem Solution Why It Works Trade-Offs and Alternatives Design Pattern 26: Feature Store Problem Solution Why It Works Trade-Offs and Alternatives Design Pattern 27: Model Versioning Problem Solution Trade-Offs and Alternatives Summary 7. Responsible AI Design Pattern 28: Heuristic Benchmark Problem Solution Trade-Offs and Alternatives Design Pattern 29: Explainable Predictions Problem Solution Trade-Offs and Alternatives Design Pattern 30: Fairness Lens Problem Solution Trade-Offs and Alternatives Summary 8. Connected Patterns Patterns Reference Pattern Interactions Patterns Within ML Projects ML Life Cycle AI Readiness Common Patterns by Use Case and Data Type Natural Language Understanding Computer Vision Predictive Analytics Recommendation Systems Fraud and Anomaly Detection Index
Donate to keep this site alive
How to download source code?
1. Go to: https://www.oreilly.com/
2. Search the book title: Machine Learning Design Patterns: Solutions to Common Challenges in Data Preparation, Model Building, and MLOps
, sometime you may not get the results, please search the main title
3. Click the book title in the search results
3. Publisher resources
section, click Download Example Code
.
1. Disable the AdBlock plugin. Otherwise, you may not get any links.
2. Solve the CAPTCHA.
3. Click download link.
4. Lead to download server to download.