2.6.3. Random Forest Classification (RFC)

The random forest algorithm is an ensemble learning method based on the decision tree method that has been applied to both object classification and regression analysis of high-dimensional data [44]. In the random forest algorithm, all the decision trees are trained on a bootstrapped sample of the original training data. To completely divide the variable space, the split node in each decision tree is randomly selected from the input samples. Only two-thirds of the input samples are involved in the building of each decision tree. The remaining one-third of the samples, which are called out-of-bag (OOB) samples, are used to validate the accuracy of the prediction. Finally, the prediction result is obtained through a majority voting strategy of the individual decision trees [45–47]. In this study, the RFC program [48] embedded in ENVI software was employed to identify maize lodging, and two parameters were tuned to generate the optimal RFC model: the number of split nodes and the number of decision trees. The optimal parameters were determined according to the accuracy of the lodging classification results. In each classification, both were reset to adapt to different feature sets.

### *2.7. Accuracy Assessment of Lodging Detection Results*

The Kappa coe fficient is an index used to measure the spatial consistency of classification results; it explicitly reveals the spatial change in the classification results [49]. The overall accuracy (OA) reflects the quality of the classification result in terms of quantity [50]. In this study, the above indicators were chosen to evaluate the correctness of maize lodging detection results.

Some scholars believe that the Kappa coe fficient is discontinuous and marginal in the evaluation of remote sensing image classification results [51]. However, these views are held only at the theoretical level and lack su fficient practical proof, especially in the study of binary classification based on remote sensing images. In general, remote sensing images and features are not considered to be independent, which is the main reason for the failure of confusion matrix and kappa coe fficient [52]. The nonoverlapping ROI or sample points of lodging and nonlodging maize needed by model training were selected before image classification. Consequently, in each image feature, the values of lodging and nonlodging maize were independent and had no influence on each other. Supported by a large number of remote sensing application practices [53,54], this study uses the Kappa coe fficient as the evaluation index for lodging recognition results.
