Random Forest (RF). This is an ensemble learning method for classification, regression, and other tasks that constructs an ensemble of decision trees from the training data and outputs a class membership that is the mean prediction of the individual trees. The training in RFs is based on the feature aggregating method. Given a training set x with output y, bagging repeatedly selects a random sample from x and y with replacement of the training set and fits decision trees to these samples. Once the training is complete, the prediction function operates by averaging the predictions from all the individual regression trees. The number of trees and the maximum tree depth are input parameters to the model.