2.4.1. Random Forest

Random forest (RF), based on the theory of decision trees, was first proposed by Breiman [24]. RF is an effective tool in prediction, because with the right input, RF produces accurate classifiers and regressors [24]. In standard trees, each node is split using the best split among all variables. In a RF, each node is split using the best among a subset of predictors randomly chosen at that node. This somewhat counterintuitive strategy performs very well in comparison to other classifiers, including discriminant analysis, SVM and neural networks, and is robust against overfitting [25]. Additionally, the execution time of RF is far less than RBF and SVM when used to process high dimensional data, because the RF algorithm itself can select the important features automatically [19]. It is also relatively robust to outliers and noise. Due to these advantages, RF was chosen for application to the relationship between the sEMG and knee joint in this study.

As an ensemble learning method, RF achieves better generalization performance by establishing multiple decision trees. If RF has *N* decision trees, it is necessary to generate *N* sample sets to train each tree. Each tree is grown as follows [26]:

