9.1 Introduction
Every technique covered in the preceding chapters — cleaning data, computing summary statistics, building visualizations — is ultimately in service of answering a question: What is happening in this data, and what should the organization do about it? Models formalize that question and its answer. A well-built model takes the patterns discovered in exploratory analysis and expresses them as a structure that can be tested, validated, and applied to new situations.
This chapter covers the complete modeling workflow, from defining the business question through deploying and monitoring a model in production. We begin by examining why a systematic workflow matters, then distinguish three types of models (descriptive, predictive, and prescriptive), and work through the principles of model selection, training, and validation with R code demonstrations.