Random forest

Random forest is an extension of decision trees. It is a forest as it is a combination of multiple trees, and is random as we randomly sample different observations for each of the decision trees.

A random forest works by averaging the prediction of each of the decision trees (which work on a sample of the original dataset).

Typically, a random forest works better than a single decision tree, as the influence of outliers is reduced in it (because in some samples, outliers might not have occurred), whereas, in a decision tree, an outlier would have definitely occurred (if the original dataset contained an outlier).

Get Hands-On Machine Learning on Google Cloud Platform now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.