Random Forest
Introduction
A Random Forest is a machine learning algorithm that operates by constructing multiple decision trees at training time and outputting the class that is the mode of the classes (classification) or mean prediction (regression) of the individual trees. It is a type of ensemble learning method, where a group of weak models combine to form a powerful model.
Background
Random Forests were first proposed by Tin Kam Ho in 1995, but the term was coined by Leo Breiman and Adele Cutler. The algorithm was an extension of Breiman's earlier work on bagging methods, which are also ensemble methods.
Algorithm
The Random Forest algorithm works in four basic steps:
1. Select random samples from a given dataset. 2. Construct a decision tree for each sample and get a prediction result from each decision tree. 3. Perform a vote for each predicted result. 4. Select the prediction result with the most votes as the final prediction.
Features
Random Forests have several features that contribute to their popularity. They are:
- Versatility: Random Forests can be used for both regression and classification tasks, and they are easy to view and understand. - Less Overfitting: The algorithm reduces overfitting by creating trees on different samples. - High Accuracy: Random Forests runtimes are quite fast, and they are able to deal with unbalanced and missing data.
Advantages and Disadvantages
Like any algorithm, Random Forests have their advantages and disadvantages.
Advantages:
- Random Forests are able to handle large datasets with high dimensionality. They can handle thousands of input variables and identify most significant variables, so it is considered as one of the dimensionality reduction methods. - The algorithm has an effective method for estimating missing data and maintains accuracy when a large proportion of the data are missing.
Disadvantages:
- Random Forests have been observed to overfit for some datasets with noisy classification/regression tasks. - Unlike decision trees, the classifications made by random forests are difficult for humans to interpret. - If the data include categorical variables with different number of levels, random forests are biased in favor of those attributes with more levels.
Applications
Random Forests are used in a variety of fields, including:
- Bioinformatics: For identifying the "gene selection problem". - Medical Diagnostics: For medical diagnosis to analyze a patient’s medical history and identify diseases. - Banking: For the detection of customers who will use the bank’s services more frequently than others and repay their debt in time. - Stock Market: To identify the stock behavior as well as the expected loss or profit.
See Also
- Decision Tree - Ensemble Learning - Machine Learning - Bootstrap Aggregating (Bagging)