Preface
Who This Book Is For
Who This Book Is NOT For
Prerequisites
What You’ll Learn
How to Use This Book
Conventions
About the Author
Acknowledgments
Chapter 1: How Real-World ML Actually Breaks
- The Problem: The 99% Accuracy That Lost Millions
- Section 1: The Production-Reality Gap
- Section 2: Failure Analysis
- Section 3: Conceptual Model
- Section 4: Why PyTorch?
- Section 5: What This Book Covers
- Section 6: Common Pitfalls
- Section 7: Exercises
- Section 8: Constraints & Tradeoffs
- Section 9: Chapter Checklist
- Section 10: References
- Summary
- Mental Model & Frameworks
- Accessibility Features
Chapter 2: PyTorch: A Tool for People Who Want Control
- The Problem: When “It Just Works” Is Not Enough
- Prerequisites Refresher: Key Concepts
- Section 1: Problem Framing
- Section 2: Failure Analysis
- Section 3: Conceptual Model
- Section 4: PyTorch Implementation
- Section 5: Common Pitfalls
- Section 6: GPU Optimization
- Section 7: Exercises
- Section 8: Real-World Project
- Section 9: Constraints & Tradeoffs
- Section 10: References
- Summary
- Mental Model & Frameworks
- Accessibility Features
Chapter 3: The Working Data Scientist’s Workflow
- The Problem: The Workflow That Prevents Disasters
- Section 1: Problem Framing
- Section 2: Failure Analysis
- Section 3: Conceptual Model
- Section 4: PyTorch Implementation
- Section 5: Common Pitfalls
- Section 6: Monitoring from Day One
- Section 7: Exercises
- Section 8: Real-World Project
- Section 9: Constraints & Tradeoffs
- Section 10: References
- Summary
- Mental Model & Frameworks
- Accessibility Features
Chapter 4: Models That Still Win: Classical ML in 2026
- The Problem: When Transformers Aren’t the Answer
- Section 1: Problem Framing
- Section 2: Failure Analysis
- Section 3: Conceptual Model
- Section 4: PyTorch Implementation
- Section 5: Common Pitfalls
- Section 6: Exercises
- Section 7: Real-World Project
- Section 8: Constraints & Tradeoffs
- Section 9: Chapter Checklist
- Section 10: References
- Summary
- Mental Model & Frameworks
- Accessibility Features
Chapter 5: Deep Learning for Structured & Tabular Data
- The Problem: When Deep Learning Finally Wins on Tabular Data
- Section 1: Problem Framing
- Section 2: Failure Analysis
- Section 3: Conceptual Model
- Section 4: PyTorch Implementation
- Section 5: Common Pitfalls
- Section 6: Exercises
- Section 7: Real-World Project
- Section 8: Constraints & Tradeoffs
- Section 9: Chapter Checklist
- Section 10: References
- Summary
- Mental Model & Frameworks
- Accessibility Features
Chapter 6: Time, Sequences & Human Behavior
- The Problem: When Sequences Break Everything
- Section 1: Problem Framing
- Section 2: Failure Analysis
- Section 3: Conceptual Model
- Section 4: PyTorch Implementation
- Section 5: Common Pitfalls
- Section 6: Exercises
- Section 7: Real-World Project
- Section 8: Constraints & Tradeoffs
- Section 9: Chapter Checklist
- Section 10: References
- Summary
- Mental Model & Frameworks
- Accessibility Features
Chapter 7: Finance — Price Movements & Market Regimes
- The Problem: Trying to Predict a Market That Adapts to You
- Section 1: Problem Framing
- Section 2: Failure Analysis
- Section 3: Conceptual Model
- Section 4: PyTorch Implementation
- Section 5: Common Pitfalls
- Section 6: Exercises
- Section 7: Real-World Project
- Section 8: Constraints & Tradeoffs
- Section 9: Chapter Checklist
- Section 10: References
- Summary
- Mental Model & Frameworks
- Accessibility Features
Chapter 8: Retail — Sales Forecasting & Inventory Dynamics
- The Problem: Forecasting at Scale Without Losing the Signal
- Section 1: Problem Framing
- Section 2: Failure Analysis
- Section 3: Conceptual Model
- Section 4: PyTorch Implementation
- Section 5: Common Pitfalls
- Section 6: Exercises
- Section 7: Real-World Project
- Section 8: Constraints & Tradeoffs
- Section 9: Chapter Checklist
- Section 10: References
- Summary
- Mental Model & Frameworks
- Accessibility Features
Chapter 9: Operations — Supply Chain ML That Doesn’t Collapse
- The Problem: When Averages Break the Supply Chain
- Section 1: Problem Framing
- Section 2: Failure Analysis
- Section 3: Conceptual Model
- Section 4: PyTorch Implementation
- Section 5: Common Pitfalls
- Section 6: Exercises
- Section 7: Real-World Project
- Section 8: Constraints & Tradeoffs
- Section 9: Chapter Checklist
- Section 10: References
- Summary
- Mental Model & Frameworks
- Accessibility Features
Chapter 10: Sports Analytics — Modeling MMA/Football
- The Problem: Finding Signal in a Game Full of Noise
- Section 1: Problem Framing
- Section 2: Failure Analysis
- Section 3: Conceptual Model
- Section 4: PyTorch Implementation
- Section 5: Common Pitfalls
- Section 6: Exercises
- Section 7: Real-World Project
- Section 8: Constraints & Tradeoffs
- Section 9: Chapter Checklist
- Section 10: References
- Summary
- Mental Model & Frameworks
- Accessibility Features
Chapter 11: Macroeconomics & Geopolitics — Modeling Uncertainty
- The Problem: When History Stops Being a Training Dataset
- Section 1: Problem Framing
- Section 2: Failure Analysis
- Section 3: Conceptual Model
- Section 4: PyTorch Implementation
- Section 5: Common Pitfalls
- Section 6: Exercises
- Section 7: Real-World Project
- Section 8: Constraints & Tradeoffs
- Section 9: Chapter Checklist
- Section 10: References
- Summary
- Mental Model & Frameworks
- Accessibility Features
Chapter 12: Evaluating ML Beyond Accuracy
- The Problem: The 99.1% Accuracy That Destroyed Value
- Section 1: The Problem with Accuracy
- Section 2: Failure Analysis
- Section 3: Conceptual Model
- Section 4: PyTorch Implementation
- Section 5: Common Pitfalls
- Section 6: Exercises
- Section 7: Real-World Project
- Section 8: Constraints & Tradeoffs
- Section 9: Chapter Checklist
- Section 10: References
- Summary
- Mental Model & Frameworks
- Accessibility Features
Chapter 13: Drift, Decay & the Strange Ways ML Degrades
- The Problem: The Model That Died While No One Was Watching
- Section 1: The Problem of Non-Stationarity
- Section 2: Failure Analysis
- Section 3: Conceptual Model
- Section 4: PyTorch Implementation
- Section 5: Common Pitfalls
- Section 6: Exercises
- Section 7: Real-World Project
- Section 8: Constraints & Tradeoffs
- Section 9: Chapter Checklist
- Section 10: References
- Summary
- Mental Model & Frameworks
- Accessibility Features
Chapter 14: Packaging, Deployment & Interfaces
- The Problem: The Model That Worked in Notebooks But Failed in Production
- Section 1: The Deployment Challenge
- Section 2: Failure Analysis
- Section 3: Conceptual Model
- Section 4: PyTorch Implementation
- Section 5: Common Pitfalls
- Section 6: Exercises
- Section 7: Real-World Project
- Section 8: Constraints & Tradeoffs
- Section 9: Chapter Checklist
- Section 10: References
- Summary
- Mental Model & Frameworks
- Accessibility Features
Chapter 15: Silent Failures: The Ones That Steal Weekends
- The Problem: The Data Column Swap That Nobody Noticed
- Section 1: The Problem of Silent Failures
- Section 2: Failure Analysis
- Section 3: Conceptual Model
- Section 4: PyTorch Implementation
- Section 5: Common Pitfalls
- Section 6: Exercises
- Section 7: Real-World Project
- Section 8: Constraints & Tradeoffs
- Section 9: Chapter Checklist
- Section 10: References
- Summary
- Accessibility Features
Chapter 16: Debugging ML with Surgical Tools
- The Problem: The Model That Wasn’t Learning Anything
- Section 1: The Problem of Opaque Failures
- Section 2: Failure Analysis
- Section 3: Conceptual Model
- Section 4: PyTorch Implementation
- Section 5: Common Pitfalls
- Section 6: Exercises
- Section 7: Real-World Project
- Section 8: Constraints & Tradeoffs
- Section 9: Chapter Checklist
- Section 10: References
- Summary
- Accessibility Features
Chapter 17: ML in Enterprise: Governance, Interfaces & Trust
- The Problem: The Model That Wasn’t Allowed to Ship
- Section 1: The Enterprise Challenge
- Section 2: Governance Frameworks
- Section 3: Explainability and Transparency
- Section 4: Access Control and Multi-Tenancy
- Section 5: Common Pitfalls
- Section 6: Exercises
- Section 7: Real-World Project
- Section 8: Constraints & Tradeoffs
- Section 9: Chapter Checklist
- Section 10: References
- Summary
- Accessibility Features
Chapter 18: Scaling ML: From One Model to an Organization
- The Problem: The Platform That Couldn’t Scale
- Section 1: The Scaling Challenge
- Section 2: Platform Architecture
- Section 3: Multi-Model Management
- Section 4: Monitoring at Scale
- Section 5: Cost Optimization
- Section 6: Organizational Scaling
- Section 7: Common Pitfalls
- Section 8: Exercises
- Section 9: Real-World Project
- Section 10: Constraints & Tradeoffs
- Section 11: Chapter Checklist
- Section 12: References
- Summary
- Accessibility Features
Appendix A: PyTorch Cheatsheet
- Tensor Creation
- Tensor Operations
- Autograd: The Engine
- nn.Module: Building Blocks
- Loss Functions
- Optimizers
- DataLoader: Feeding the Model
- Common Patterns
- GPU Usage
- Moving Between Devices and Formats
- Debugging Tips
Appendix B: Project Skeleton
- Book Code Repository Structure
- Your Project Structure
- Directory Purpose
- Using TorchML in Your Project
- Essential Files
- Quick Start Commands
Appendix C: Model Comparison
- Classification by Data Type
- Tabular Data
- Sequence Data
- Image Data
- Multimodal
- Performance Benchmarks
- Selection Heuristics
- When to Switch
- Architecture Evolution
Appendix D: Diagnostics Checklist
- Phase 1: Data Validation
- Phase 2: Model Setup
- Phase 3: Training Loop
- Phase 4: Monitoring During Training
- Phase 5: Post-Training Validation
- Phase 6: Production Readiness
- Quick Diagnostic Script
Appendix E: Datasets & Code Index
- Code Repository
- Code Repository Structure
- TorchML Framework
- Quick Code Reference
- Quick Code Reference
- External Resources
Master Glossary
- Core ML Concepts
- Production ML Concepts
- Domain-Specific Concepts
- Evaluation & Metrics
- Time Series & Sequences
- Testing & Validation
- Governance & Operations
- Deep Learning & Architectures
- Alphabetical Index
- Quick Reference by Concept