Past exam of the mathematics course of the University of Cambridge 2024 iii Paper 218 3 c Solution Created 2026-09-24 Updated 2026-09-25
A random forest fits each of its classification trees to an independent bootstrap sample of the nine observations. At each node it draws
mtry=2 candidate coordinates; because the data have exactly two coordinates, both are available, and a CART impurity calculation chooses the split. The trees are grown deeply without ordinary cost-complexity pruning, and their majority vote is the forest prediction.R reports an out-of-bag error estimate: an observation is predicted only by trees whose bootstrap samples omitted it. The confusion matrix says that class 1 has three correct and three incorrect out-of-bag predictions, while class 2 has one correct and two incorrect predictions. Hence the total out-of-bag error is .