From the course: Machine Learning with scikit-learn
Unlock this course with a free trial
Join today to access over 25,500 courses taught by industry experts.
Rapidly build models with random forest - scikit-learn Tutorial
From the course: Machine Learning with scikit-learn
Rapidly build models with random forest
Decision trees are powerful because they're easy to interpret, but that strength can also be a weakness. A single tree has a tendency to memorize its training data. If you let it grow too deep, it will start carving out overly specific boundaries that perfectly classify the training set, but fail to generalize to new data. This problem is called overfitting, it's one of the most common pitfalls in machine learning. The solution? Combine many imperfect trees into one strong model. This is called an ensemble. Instead of trusting a single decision tree, you train a collection of trees and let them vote on the final prediction. Each tree sees a slightly different slice of the data in a random subset of the features, So they learn different patterns and make different mistakes. When you aggregate their predictions, the errors tend to cancel out and the shared signal becomes stronger. That idea forms the foundation of the Random Forest, one of the most reliable and high-performing…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
(Locked)
Predict values with supervised learning2m 44s
-
(Locked)
Format your data4m 33s
-
(Locked)
Perform a train-test split3m 58s
-
(Locked)
Create a linear regression model4m 16s
-
(Locked)
Leverage logistic regression3m 43s
-
(Locked)
Evaluate classification models4m 46s
-
(Locked)
Build a decision tree4m 47s
-
(Locked)
Rapidly build models with random forest3m 42s
-
(Locked)
Boost model performance3m 31s
-
(Locked)
-
-
-