Save this video free

StatQuest: Random Forests Part 2: Missing data and clustering

StatQuest with Josh Starmer · 10:48 · Watch on YouTube

These notes were made with YouTube Collector. Paste any YouTube link and get the same: a summary, chapters and a searchable transcript.

Overview

Josh Starmer's StatQuest on Random Forests Part 2 details two methods for handling missing data: imputation during model training and classification of new samples. For training data, missing values are initially guessed and iteratively refined using proximity matrices derived from running data through random forest trees. For new samples, two versions are created (one for each potential outcome of the missing feature) and run through the forest to determine which best aligns with the model's predictions.

Key takeaways

Chapters

0:00 Handling Missing Data During Random Forest Training

Keep these chapters and the full searchable transcript in your own library.

Transcript excerpt

0:00 Random Forest Part Two. Hip hip. Hooray. It's true. Stat Quest. Hello, I'm Josh Starmer and welcome to Stat Quest. Today we're doing Random Forest part two and we're going to focus on missing data in sample clustering. To be honest, the sample clustering aspect of random forest is my favorite part. So, I'm really excited we're going to cover it. Here's our data set. We've got data for four separate patients. However, for patient number four, we've got some missing data. Random forests consider two types of missing data. One, missing data in the original data set used to create the random forest. And two, missing data in a new sample that we want to categorize.

0:49 We'll start with this one. So, we want to create a random forest from this data. However, we don't know if this patient has blocked arteries or their weight. The general idea for dealing with missing data in this context is to make an initial guess that could be bad and then gradually refine the guess until it is hopefully a good guess. Because this person did not have heart disease, the initial and possibly bad guess for the blocked arteries value is just the most common value for blocked arteries found in the other samples that do not have heart disease. Among the people that do not have heart disease, no is the most common value for blocked arteries. It occurs in two out

1:39 of two samples. So no is our initial guess. Since weight is numeric, our initial guess will be the median value of the patients that did not have heart disease. In this case, the median value is 167.5. Here's our new data set with the filledin missing values. Now we want to refine these guesses. We do this by first determining which

This is the start of the transcript. Save this video free for the whole transcript, searchable and time-coded.

Related notes

Summary, takeaways, and chapters were generated by AI from the video's transcript and may contain errors. The video belongs to its creator, StatQuest with Josh Starmer.

Want the full transcript?

Save this video in YouTube Collector to get its complete searchable transcript, your own AI summaries, and a library that keeps every video you collect in one place.