Week 10: Random Forests
We return to the classification and regression trees introduced in Week 6. A single tree is easy to interpret but can change substantially when its training observations change. This week uses averaging and random candidate predictors to build a more stable prediction rule.
Guiding question: Why can averaging many different trees improve prediction?
Quiz 3 is Tuesday, October 27, 2026, before the Week 9 discussion, and covers the Week 6 through Week 8 discussions. The random-forests lecture is Thursday, October 29, 2026. Its discussion session is Tuesday, November 3, 2026.
Learning goals
By the end of this week, you should be able to:
- explain how a tree makes predictions and why its fitted rule can be unstable;
- describe how bootstrap aggregation and random candidate predictors produce a forest;
- identify the roles of tree count, sample size, candidate predictors, and terminal-node size;
- use out-of-bag error to compare random-forest tuning settings;
- interpret forest-kernel weights and permutation importance; and
- explain how splitting on relevant predictors changes a forest’s local neighborhoods.
Lecture notes
Classification and Regression Trees
Splitting rules, leaf predictions, recursive partitioning, and cost-complexity pruning. This lecture also appears in Week 6.
-
Bagging, candidate predictors, node size, correlation among tree predictions, OOB tuning, and variable importance, with parallel R and Python code.
Understanding Random Forest Kernels
Tree neighborhoods, forest-kernel weights, and adaptiveness to relevant predictors, with parallel R and Python examples using RLT.
Homework 10
Homework 10 has three questions. First, study how node size and mtry affect squared bias and variance in a simulation. Then classify MNIST digits using 20 principal components, tune by OOB error, and interpret variable importance. Finally, discuss how you would write a skill for a future random-forest analysis. For Questions 1 and 2, use either R or Python with RLT. Homework is evaluated as Complete or Incomplete.
Solutions for Questions 1 and 2 are now available. No solution will be provided for Question 3.
Place homework-10.pdf or homework-10.html in the homework/week-10/ folder of your stat432-fall2026 GitHub repository by Sunday, November 1, 2026, at 11:59 p.m. Central Time. The report must be either a PDF or a self-contained HTML file and must not exceed 10 pages. The final file version shown on GitHub is treated as the submitted version, and its GitHub timestamp determines whether it is on time.
Discussion Session on Tuesday, November 3, 2026
Submit discussion/week-10-question.md by Sunday, November 1, 2026, at 11:59 p.m. Central Time. This required weekly discussion question counts toward the Weekly GitHub Discussion Questions component, worth 10% of the course grade.
The final version shown on GitHub is the submitted version. If its GitHub timestamp is after the deadline, the submission receives 0 points. No late-submission exceptions are allowed.
For the required format and GitHub submission steps, see Discussion Questions: Procedures and Rules.
The Week 10 discussion session is Tuesday, November 3, 2026. Open Popping when the instructor asks you to join.
See the Discussion tab for login information. Tell the instructor during class if you cannot sign in.
Week 10 is included in Quiz 4 on Tuesday, November 17, 2026, which covers the Week 9 through Week 11 discussions. See Quizzes for the quiz format.
Discussion Question Topics
The following topics are suggestions. Your question is not limited to this list, but it should relate to the Week 10 material.
Tree instability and bagging. This topic includes bootstrap sampling, prediction variability, and the benefits and limitations of averaging.
Feature subsampling. Candidate predictors relate to tree similarity, model flexibility, and the bias-variance trade-off.
Out-of-bag tuning. This topic covers OOB error, parameter selection, and the strengths and limitations of OOB evaluation.
Forest kernels. Forest weights connect tree partitions, local neighborhoods, and adaptiveness.
Interpreting a forest. This topic includes variable importance, predictor relationships, and the limits of model interpretation.
Ask one focused question that calls for an explanation, a comparison, a short derivation, a counterexample, a small computation, or a diagnosis of a concrete difficulty. Do not submit a request for code alone or repeat a homework calculation without asking about the statistical reasoning or the specific difficulty you encountered.