A CART decision tree splits the data recursively on one predictor at a time, detecting automatically whether the outcome calls for regression or classification.
CART builds a binary tree by recursively choosing the best split (variable + threshold) at each node — best meaning the split that most reduces impurity (Gini / entropy for classification, residual SS for regression). Splits stop at leaves when no further improvement justifies the added complexity.
Trade-off vs other models: trees are interpretable (each prediction is a chain of if-then rules), handle non-linear interactions natively, and tolerate mixed numeric / categorical inputs without preprocessing. But single trees overfit easily and are unstable (small data changes give different trees) — for production prediction, an ensemble (random forest, boosted trees) usually wins.
The cp (complexity parameter) controls pruning: smaller cp ⇒ larger tree. Use the 1-SE rule on the printed cptable to pick a parsimonious cp.
Outcome (numeric → regression, categorical → classification) + predictors + cp + minsplit + maxdepth.
Indented tree + variable importance bars + confusion matrix or RMSE/R² + a cost-complexity table for pruning.
Variable importance rankings are influenced by the splitting algorithm — use as a relative ranking, not as absolute effect sizes.