 \varepsilon \right)}_{\text{Irr. error}}
\end{align}`
$$

.b[The tradeoff] in terms of model flexibility:

- At first, adding flexibility reduces bias more than it increases variance.
- Later on, the bias reduction gets swamped out by increases in variance.
- At some point, the marginal benefits of flexibility equal marginal costs.


---
class: inverse, middle
name: resampling
# Cross-validation

---
layout: false
# Cross-validation

**How do we choose the best model?** (e.g., degree of polynomial)
- Based