CART (Classification and Regression Tree) learns a binary decision tree by asking feature-based questions that separate examples into their categories. For diamond data, it might ask whether Carat is at least 0.5 or whether Price exceeds a threshold. section 8.17
A practical CART training loop works like this:
- Represent each decision as a question, then split examples into true and false groups. section 8.17
- Measure impurity with the Gini index, which reflects how mixed the labels are. section 8.17
- Test feature values, choose the split with the greatest information gain, and repeat recursively. section 8.17
- Stop when a split produces no gain and store the remaining label counts in a leaf node. section 8.17
Figure 8.19 A basic flow for building a decision tree
Use the flow diagram to follow CART from candidate questions through data splits to a trained tree. section 8.17

