liveBook · Manning

What you will learn in Machine Learning System Design

With end-to-end examples

by Valerii Babushkin and Arseny Kravchenko

Chapter by chapter

Chapter 1: Essentials of machine learning system design

1.1 ML system design: What are you? · 1.1.1 Why ML system design is so important · 1.1.2 Roots of ML system design · 1.2 How this book is structured · 1.3 When principles of ML system design can be helpful · 1.4 Summary

What you learn in chapter 1 →

Chapter 2: Is there a problem?

2.1 Problem space vs. solution space · 2.2 Finding the problem · 2.2.1 How we can approximate a solution through an ML system · 2.3 Risks, limitations, and possible consequences · 2.4 Costs of a mistake · 2.5 Summary

What you learn in chapter 2 →

Chapter 3: Preliminary research

3.1 What problems can inspire you? · 3.2 Build or buy: Open source-based or proprietary tech · 3.2.1 Build or buy · 3.2.2 Open source-based or proprietary tech · 3.3 Problem decompositioning · 3.4 Choosing the right degree of innovation · 3.4.1 What solutions can be useful? · 3.4.2 Working on the solution space: Practical example · 3.5 Summary

What you learn in chapter 3 →

Chapter 4: Design document

4.1 Common myths surrounding the design document · 4.1.1 Myth #1. Design documents work only for big companies but not startups · 4.1.2 Myth #2. Design documents are efficient only for complex projects · 4.1.3 Myth #3. Every design document should be based on a template · 4.1.4 Myth #4. Every design document should lead to a deployed system · 4.2 Goals and antigoals · 4.3 Design document structure · 4.4 Reviewing a design document · 4.4.1 Design document review example · 4.5 A design doc is a living thing · 4.6 Summary

What you learn in chapter 4 →

Chapter 5: Loss functions and metrics

5.1 Losses · 5.1.1 Loss tricks for deep learning models · 5.2 Metrics · 5.2.1 Consistency metrics · 5.2.2 Offline and online metrics, proxy metrics, and hierarchy of metrics · 5.3 Design document: Adding losses and metrics · 5.3.1 Metrics and loss functions for Supermegaretail · 5.3.2 Metrics and loss functions for PhotoStock Inc. · 5.3.3 Wrap up · 5.4 Summary

What you learn in chapter 5 →

Chapter 6: Gathering datasets

6.1 Data sources · 6.2 Cooking the dataset · 6.2.1 ETL · 6.2.2 Filtering · 6.2.3 Feature engineering · 6.2.4 Labeling · 6.3 Data and metadata · 6.4 How much data is enough? · 6.5 Chicken-or-egg problem · 6.6 Properties of a healthy data pipeline · 6.7 Design document: Dataset · 6.7.1 Dataset for Supermegaretail · 6.7.2 Dataset for PhotoStock Inc. · 6.8 Summary

What you learn in chapter 6 →

Chapter 7: Validation schemas

7.1 Reliable evaluation · 7.2 Standard schemas · 7.2.1 Holdout sets · 7.2.2 Cross-validation · 7.2.3 The choice of K · 7.2.4 Time-series validation · 7.3 Nontrivial schemas · 7.3.1 Nested validation · 7.3.2 Adversarial validation · 7.3.3 Quantifying dataset leakage exploitation · 7.4 Split updating procedure · 7.5 Design document: Choosing validation schemas · 7.5.1 Validation schemas for Supermegaretail · 7.5.2 Validation schemas for PhotoStock Inc. · 7.6 Summary

What you learn in chapter 7 →

Chapter 8: Baseline solution

8.1 Baseline: What are you? · 8.2 Constant baselines · 8.2.1 Why do we need constant baselines? · 8.3 Model baselines and feature baselines · 8.4 Variety of deep learning baselines · 8.5 Baseline comparison · 8.6 Design document: Baselines · 8.6.1 Baselines for Supermegaretail · 8.6.2 Baselines for PhotoStock Inc. · 8.7 Summary

What you learn in chapter 8 →

Chapter 9: Error analysis

9.1 Learning curve analysis · 9.1.1 Overfitting and underfitting · 9.1.2 Loss curve · 9.1.3 Interpreting loss curves · 9.1.4 Model-wise learning curve · 9.1.5 Sample-wise learning curve · 9.1.6 Double descent · 9.2 Residual analysis · 9.2.1 Goals of residual analysis · 9.2.2 Model assumptions · 9.2.3 Residual distribution · 9.2.4 Fairness of residuals · 9.2.5 Underprediction and overprediction · 9.2.6 Elasticity curves · 9.3 Finding commonalities in residuals · 9.3.1 Worst/best-case analysis · 9.3.2 Adversarial validation · 9.3.3 Variety of group analysis · 9.3.4 Corner-case analysis · 9.4 Design document: Error analysis · 9.4.1 Error analysis for Supermegaretail · 9.4.2 Error analysis for PhotoStock Inc. · 9.5 Summary

What you learn in chapter 9 →

Chapter 10: Training pipelines

10.1 Training pipeline: What are you? · 10.1.1 Training pipeline vs. inference pipeline · 10.2 Tools and platforms · 10.3 Scalability · 10.4 Configurability · 10.5 Testing · 10.5.1 Property-based testing · 10.6 Design document: Training pipelines · 10.6.1 Training pipeline for Supermegaretail · 10.6.2 Training pipeline for PhotoStock Inc. · 10.7 Summary

What you learn in chapter 10 →

Chapter 11: Features and feature engineering

11.1 Feature engineering: What are you? · 11.1.1 Criteria of good and bad features · 11.1.2 Feature generation 101 · 11.1.3 Model predictions as a feature · 11.2 Feature importance analysis · 11.2.1 Classification of methods · 11.2.2 Accuracy–interpretability tradeoff · 11.2.3 Feature importance in deep learning · 11.3 Feature selection · 11.3.1 Feature generation vs. feature selection · 11.3.2 Goals and possible drawbacks · 11.3.3 Feature selection method overview · 11.4 Feature store · 11.4.1 Feature store: Pros and cons · 11.4.2 Desired properties of a feature store · 11.4.3 Feature catalog · 11.5 Design document: Feature engineering · 11.5.1 Features for Supermegaretail · 11.5.2 Features for PhotoStock Inc. · 11.6 Summary

What you learn in chapter 11 →

Chapter 12: Measuring and reporting results

12.1 Measuring results · 12.1.1 Model performance · 12.1.2 Transition to business metrics · 12.1.3 Simulated environment · 12.1.4 Human evaluation · 12.2 A/B testing · 12.2.1 Experiment design · 12.2.2 Splitting strategy · 12.2.3 Selecting metrics · 12.2.4 Statistical criteria · 12.2.5 Simulated experiments · 12.2.6 When A/B testing is not possible · 12.3 Reporting results · 12.3.1 Control and auxiliary metrics · 12.3.2 Uplift monitoring · 12.3.3 When to finish the experiment · 12.3.4 What to report · 12.3.5 Debrief document · 12.4 Design document: Measuring and reporting · 12.4.1 Measuring and reporting for Supermegaretail · 12.4.2 Measuring and reporting for PhotoStock Inc. · 12.5 Summary

What you learn in chapter 12 →

Chapter 13: Integration

13.1 API design · 13.1.1 API practices · 13.2 Release cycle · 13.3 Operating the system · 13.3.1 Tech-related connections · 13.3.2 Non-tech-related connections · 13.4 Overrides and fallbacks · 13.5 Design document: Integration · 13.5.1 Integration for Supermegaretail · 13.5.2 Integration for PhotoStock Inc. · 13.6 Summary

What you learn in chapter 13 →

Chapter 14: Monitoring and reliability

14.1 Why monitoring is important · 14.1.1 Incoming data · 14.1.2 Model · 14.1.3 Model output · 14.1.4 Postprocessing/decision-making · 14.2 Software system health · 14.3 Data quality and integrity · 14.3.1 Processing problems · 14.3.2 Data source corruption · 14.3.3 Cascade/upstream models · 14.3.4 Schema change · 14.3.5 Training-serving skew · 14.3.6 How to monitor and react · 14.4 Model quality and relevance · 14.4.1 Data drift · 14.4.2 Concept drift · 14.4.3 How to monitor · 14.4.4 How to react · 14.5 Design document: Monitoring · 14.5.1 Monitoring for Supermegaretail · 14.5.2 Monitoring for PhotoStock Inc. · 14.6 Summary

What you learn in chapter 14 →

Chapter 15: Serving and inference optimization

15.1 Serving and inference: Challenges · 15.2 Tradeoffs and patterns · 15.2.1 Tradeoffs · 15.2.2 Patterns · 15.3 Tools and frameworks · 15.3.1 Choosing a framework · 15.3.2 Serverless inference · 15.4 Optimizing inference pipelines · 15.4.1 Starting with profiling · 15.4.2 The best optimizing is minimum optimizing · 15.5 Design document: Serving and inference · 15.5.1 Serving and inference for Supermegaretail · 15.5.2 Serving and inference for PhotoStock Inc. · 15.6 Summary

What you learn in chapter 15 →

Chapter 16: Ownership and maintenance

16.1 Accountability · 16.2 Bus factor · 16.2.1 Why is being too efficient not beneficial? · 16.2.2 Why is being too redundant not beneficial? · 16.2.3 When and how to use the bus factor · 16.3 Documentation · 16.4 Complexity · 16.5 Maintenance and ownership: Supermegaretail and PhotoStock Inc. · 16.6 Summary

What you learn in chapter 16 →

Concepts explained in this book

These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.