This graduate textbook on machine learning tells a story of how patterns indata support predictions and consequential actions. Starting with thefoundations of decision making, we cover representation, optimization, andgeneralization as the constituents of supervised learning. A chapter ondatasets as benchmarks examines their histories and scientific bases.Self-contained introductions to causality, the practice of causal inference,sequential decision making, and reinforcement learning equip the reader withconcepts and tools to reason about actions and their consequences. Throughout,the text discusses historical context and societal impact. We invite readersfrom all backgrounds; some experience with probability, calculus, and linearalgebra suffices.