Neural Networks Overview
- 24Unfamiliar
- 0Learning
- 0Familiar
- 0Mastered
Why are decision trees preferred over neural networks in contexts like election audits?
24 questions
- 1
Why are decision trees preferred over neural networks in contexts like election audits?
Model answer
Decision trees are transparent and interpretable, which is necessary to inspire public confidence and allow non-experts to understand and trust the process.
Explanation
The lecture emphasizes that complex methods like neural networks would meet resistance, while simple, interpretable models like decision trees can be adopted by election officials and the public.
- 2
Give an example from the lecture where an interpretable model helped detect a data bias.
Model answer
In a pneumonia study, an interpretable model revealed that patients with asthma had lower risk of death from pneumonia, which was due to them being admitted to the ICU and receiving aggressive care (Simpson's paradox).
Explanation
The neural network could not reveal this pattern, but the interpretable model allowed experts to recognize the confounding effect.
- 3
What is the key trade-off between decision trees and random forests according to the lecture?
Model answer
Decision trees are interpretable but have lower predictive performance, while random forests have high predictive performance but lose interpretability.
Explanation
The lecture states that decision trees are good for interpretability, but random forests (ensembles of trees) achieve better predictive accuracy at the cost of interpretability.
- 4
Define the components of a decision tree: internal nodes and leaf nodes.
Model answer
Internal nodes are defined by a dimension index j and a split value s, and have two child nodes. Leaf nodes are defined by a label (prediction) and have no children.
Explanation
The lecture explicitly describes these components: internal nodes perform splits, leaves provide the final prediction.
- 5
How does a classification tree differ from a regression tree?
Model answer
In a classification tree, leaf nodes predict a discrete class label (e.g., high/low risk), while in a regression tree, leaf nodes predict a continuous value (e.g., kilometers run).
Explanation
The lecture uses classification for medical risk and regression for running distance, highlighting that the only difference is the type of label predicted.
- 6
What is an axis-aligned partition of the feature space?
Model answer
It is a division of the feature space into rectangular regions where splits are parallel to the feature axes (i.e., using a threshold on a single feature).
Explanation
The lecture explains that decision trees create such partitions, leading to piecewise constant predictions.
- 7
Why is the prediction of a regression tree a step function?
Model answer
Because each leaf region predicts a constant value, and moving from one region to an adjacent region causes an abrupt change in prediction.
Explanation
The lecture shows that the output is a step function, as different rectangular regions have different constant predictions.
- 8
What are the parameters of a decision tree?
Model answer
For each internal node: the split dimension j and split value s; for each leaf node: the label. The tree structure (how many nodes, their connections) is also part of the parameters, and its dimension is not fixed.
Explanation
The lecture notes that parameters include split dimensions, split values, leaf labels, and the tree topology, which can vary in size.
- 9
Why can't gradient descent be used to train a decision tree?
Model answer
Because the decision tree structure is discrete and non-differentiable; decisions like choosing a split dimension or whether to split are not continuous functions of parameters.
Explanation
The lecture explicitly states that gradient descent relies on differentiability, which decision trees lack due to discrete choices.
- 10
In the BuildTree algorithm, what is the role of the parameter k?
Model answer
k is the minimum number of data points allowed in a leaf. If the number of indices ∣I∣ in a node is leqk, the node becomes a leaf instead of splitting further.
Explanation
The lecture defines k as a hyperparameter controlling tree size; when ∣I∣leqk, the algorithm stops splitting.
- 11
How is the label of a leaf node determined for a regression tree with squared error loss?
Model answer
The label is the average of the y values of the training data points that fall into that leaf.
Explanation
The lecture derives that minimizing squared error within a leaf yields the mean of the target values in that leaf.
- 12
Describe the greedy split selection procedure in decision tree learning.
Model answer
The algorithm considers each feature dimension j and candidate split values s (typically midpoints between consecutive data points), computes the total squared error after splitting, and chooses the (j,s) that minimizes that error.
Explanation
The lecture explains this greedy approach: at each node, it tries all possible splits and picks the one that most reduces the training loss.
- 13
Why is it sufficient to consider only finitely many split values even for continuous features?
Model answer
Because splits between two data points produce the same training error if no data points lie between them; only splits at distinct data point values change the partition, so we consider splits at values that actually separate data.
Explanation
The lecture uses the observation that moving a split between data points does not change which training points fall on each side, so the loss is invariant; thus we only need to try unique split points (e.g., midpoints between consecutive feature values).
- 14
What is the main limitation of a greedy tree-building algorithm?
Model answer
It makes locally optimal decisions without considering future splits; a split that yields no immediate improvement might still be beneficial for later splits (e.g., XOR-like patterns).
Explanation
The lecture gives an example where an apparently useless first split is necessary to later partition the data correctly; greedy stopping would miss that.
- 15
What is cost complexity pruning?
Model answer
It is a method that adds a penalty alpha times the number of leaves to the training loss: C(T)=extTrainingLoss(T)+alphacdot∣extleaves∣, and then prunes subtrees that do not reduce the cost.
Explanation
The lecture defines this objective, where increasing alpha leads to simpler trees, and pruning removes unnecessary subtrees.
- 16
How does cost complexity pruning produce a sequence of candidate trees?
Model answer
By gradually increasing alpha, subtrees become suboptimal when their cost exceeds that of replacing them with a leaf; each time a subtree is pruned, we get a new tree. This yields a finite sequence from full tree to root.
Explanation
The lecture describes that as alpha increases, one by one, subtrees that do not improve the trade-off are pruned, generating a nested sequence of trees.
- 17
How is the optimal tree selected after pruning?
Model answer
Using cross-validation on the sequence of candidate trees to select the one with the best estimated generalization performance.
Explanation
The lecture mentions cross-validation is used to choose the best tree among the pruned candidates.
- 18
What is bagging (bootstrap aggregating)?
Model answer
Bagging creates B new training datasets by sampling with replacement from the original data, trains a predictor on each, and combines them by averaging (regression) or majority voting (classification).
Explanation
The lecture defines bagging: bootstrap samples, then aggregate predictions.
- 19
Explain the bootstrap step in bagging.
Model answer
For each bag b=1,dots,B, a dataset of size n is created by drawing n samples uniformly with replacement from the original dataset. This results in some original points appearing multiple times and some not at all.
Explanation
The lecture illustrates with billiard balls: each draw is from the full set (with replacement), so duplicates occur.
- 20
How does bagging improve prediction performance?
Model answer
By averaging (or voting) over many predictors trained on slightly different datasets, bagging reduces variance while maintaining low bias, leading to a more stable and accurate model.
Explanation
The lecture states bagging is surprisingly effective, especially when base predictors are unstable (like trees).
- 21
In bagging for classification, how is the final prediction made?
Model answer
The final prediction is the class that receives the most votes among the B classifiers (majority voting).
Explanation
The lecture says for classification, you take the class with the highest vote count.
- 22
What is a random forest?
Model answer
A random forest is bagging applied to decision trees, with an additional randomization step: at each split, only a random subset of m features is considered (selected uniformly without replacement) instead of all d features.
Explanation
The lecture defines random forest as bagged trees with feature subsampling to reduce correlation between trees.
- 23
Why does random forest select a random subset of features at each split?
Model answer
To decrease correlation between the trees; if all trees use the same strong features, they would be similar, and averaging would not reduce variance as much. Random feature subsets increase diversity.
Explanation
The lecture explicitly says this extra randomness reduces correlation between trees, improving the ensemble's performance.
- 24
How does a random forest combine its trees for regression?
Model answer
It averages the predictions of all B trees: hat{f}_{ ext{rf}}(x) = rac{1}{B} sum_{b=1}^{B} hat{f}_b(x).
Explanation
The lecture states for regression, return the average over trees (as in bagging).

Ask anything
We've read this whole study set, so questions about it get the best answers.