## 2 Materials and Methods
### Methods for FCO\({}_{2}\) Prediction  
#### 2.3.1 Random Forest Regression for Modeling FCO\({}_{2}\)  
The machine-learning Random Forest (RF) regression is used to model and upscale the FCO\({}_{2}\) from local scale to regional scale based on the RS data in this study. The RF is an ensemble learning method developed by [PERSON] [68], which aims to enhance the classification and regression tree (CART) method by combining a large number of decision trees. Firstly, a deterministic algorithm was utilized to generate N\({}_{i}\) bootstrap samples (i = bootstrap iteration) from the training data set (N) through replacement in the RF regression. Each selection is close to two-thirds of the training set (N). The remaining one-third of the data are used as out-of-bag data (OOB). The OOB is employed for estimating the prediction error (OOB error) and evaluating the importance of variables [69]. Secondly, many single regression trees were built in parallel by the bootstrap samples and every single tree was tested by the OOB data. Finally, the RF predicted results can be obtained by averaging the predicted results of all single regression trees [68]. The RF model can overcome multicollinearity and overfitting issues, especially for the high-dimensional datasets [42]. Therefore, the RF model has been reported as a suitable and robust algorithm for RS applications in complex earth systems such as ecology, environment, hydrology, etc. [70; 71].  
We implemented the RF model in the \"RandomForest\" package [72] within R programming software [73]. In specific, we randomly split the measured FCO\({}_{2}\) (\(n\) = 70) into two groups including 70% of samples for training (\(n\) = 49) and 30% of samples for independent validation (\(n=21\)). Before using the RF model, two important user-defined parameters need to be set in the model, namely, the number of trees (Ntree) and the number of variables (Mtry); the other parameters of this model take their default values [72]. To obtain the optimal parameters of the Ntree and Mtry for precise prediction of the FCO\({}_{2}\), the two parameters in the RF model were optimized based on the OOB error [72; 74]. The values of Ntree from 200 to 10,000 and the values of Mtry from 1 to 10 were tested, respectively [75].  
The variable importance is also provided within the RF regression, which represents the relative importance of an explanatory variable to the target variable (FCO\({}_{2}\)). Initially, the two parameters optimized above were used to generate the variable importance based on all input variables (\(n=10\)), and the percentage increase in mean square error (%IncMSE) derived from the RF regression was adopted to measure the variable importance of each independent variable. The larger the %IncMSE, the more important it is relative to the target variable. After ranking the variable importance from a permutation, the fewest number of variables that can help create the final RF model for best prediction was selected [76]. For the present study, we based on the model input variables to build the RF model by the combination of the variable important ranking and a backward feature elimination method [75; 77], which itself is based on the 10-fold cross-validation with the minimized root mean square error (RMSE) on the training data [42; 75; 78].  
Moreover, the multivariate linear regression model was established using the final selected model inputs, as well as the RF model with 10 original variables was also used to compare against the performance of our optimal RF model constructed using the final selected variables.