4.2.5 An Introduction to Trees - Video 3: Splitting and Predictions — Transcript
Full transcript
- 0:04In the previous video, we generated a
- 0:06CART tree with three splits.
- 0:09But why not two, or four, or even five?
- 0:13There are different ways to control how
- 0:15many splits are generated.
- 0:18One way is by setting a lower bound for
- 0:20the number of data points in each
- 0:22subset.
- 0:23In R, this is called the minbucket
- 0:26parameter for the minimum number of
- 0:28observations in each bucket or subset.
- 0:32The smaller minbucket is, the more
- 0:34splits will be generated.
- 0:36But if it's too small, overfitting will
- 0:39occur.
- 0:40This means that CART will fit the
- 0:42training set almost perfectly.
- 0:45But this is bad because then the model
- 0:47will probably not perform well on test
- 0:49set data or new data.
- 0:52On the other hand, if the minbucket
- 0:54parameter is too large, the model will
- 0:56be too simple and the accuracy will be
- 0:59poor.
- 1:00Later in the lecture, we'll learn about
- 1:02a nice method for selecting the stopping
- 1:04parameter.
- 1:07In each subset of a CART tree, we have a
- 1:10bucket of observations, which may
- 1:12contain both possible outcomes.
- 1:15In the small example we showed in the
- 1:17previous video, we classified each
- 1:20subset as either red or gray, depending
- 1:22on the majority in that subset.
- 1:25In the Supreme Court case, we'll be
- 1:27classifying observations as either
- 1:29affirm or reverse.
- 1:32Instead of just taking the majority
- 1:34outcome to be the prediction,
- 1:36we can compute the percentage of data in
- 1:38a subset of each type of outcome.
- 1:42As an example, if we have a subset with
- 1:4410 affirms and two reverses,
- 1:48then 87% of the data is affirm.
- 1:52Then, just like in logistic regression,
- 1:55we can use a threshold value to obtain
- 1:58our prediction.
- 1:59For this example, we would predict a
- 2:02firm with a threshold of .5 since the
- 2:05majority is a firm.
- 2:07But, if we increase that threshold to
- 2:09.9, we would predict reverse for this
- 2:12example.
- 2:15Then, by varying the threshold value, we
- 2:18can compute an ROC curve and compute an
- 2:21AUC value to evaluate our model.
- 2:25In the next video, we'll build a CART
- 2:27tree in R to predict the decisions of
- 2:29Justice Stevens and evaluate our model
- 2:32using an ROC curve.
About this transcript
This page contains the full transcript of 4.2.5 An Introduction to Trees - Video 3: Splitting and Predictions by MIT OpenCourseWare, generated from the public captions YouTube serves with the video. The transcript has 358 words across 60 segments, with the original timestamps preserved so you can click any line to jump to that moment in the embedded player.
What you can do with it
Use the transcript to take notes, quote the speaker, build a study guide, generate a summary with ChatGPT or Claude via the YouTube Summary tool, or export it as a timed subtitle file with YouTube to SRT. You can also re-open it in the transcriber to translate the transcript into 100+ languages.
Free YouTube transcript tool
YouTube2Text is a free YouTube transcript generator — no signup, no daily limit. Paste any YouTube link and get the full transcript instantly, with timestamps, click-to-jump, translation to 100+ languages, AI prompts for ChatGPT, Claude, and Gemini, and exports to TXT, SRT, VTT, or Markdown.