## 2 Materials and Methods
### Soil pH Mapping Framework
#### 2.3.1. Variable Scenario and Variable Selection  
We designed seven scenarios: scenarios 1 and 2 only included the temporal composites of Sentinel-1 and Sentinel-2, respectively, to compare their behavior in soil pH prediction, whereas scenario 3 combined radar and optical satellites (Figure 3, Table 3). Scenario 4 added the soil, climatic, and topographic variables to the previous variable pool. Instead of using natural variables, scenarios 5 and 6 introduced the cropland type and crop rotation systems, respectively. For scenario 7, all the candidate variables were fed as inputs to the modeling process.  
Since the scenarios had a different number of variables and the satellite data dramatically increased the variables' numbers, variable selection was necessary to deal with redundancy and collinearity and improve model accuracy. Here, we selected the modified greedy feature selection (MGFS) algorithm, owing to its advantages in model parsimony and accuracy over Boruta, recursive feature elimination (RFE), and variance inflation factor analysis [52]. Opposite to RFE, MGFS adopts a forward selection strategy including five steps: (1) fit a model using all the variables and calculate the variables' importance; (2) select the most important variable (only one) to fit an initial model and calculate its performance by k-fold cross-validation; (3) fit a list of models using two variables (the combinations of variable(s) in the pool and one of the remaining variables), calculate their  
Figure 3: Flowchart of the soil pH prediction in this study. MGFS represents the modified greedy feature selection algorithm (Section 2.3.1). The color of soil samples is used to refer to different groups.  
\begin{table}
\begin{tabular}{c l l} \hline \hline \multicolumn{2}{c}{**Combinations of Environmental Variables**} & \multicolumn{2}{c}{**Number of Variables**} \\ \hline
1 & Bimonthly median composites of Sentinel-1 & 120 (3 bands \(\times\) 40 intervals) \\ \hline
2 & Seasonal median composites of Sentinel-2 & 224 (16 bands and indices \(\times\) 14 intervals) \\ \hline
3 & Median composites of Sentinel-1/2 & 344 (120 + 224) \\ \hline
4 & Median composites of Sentinel-1/2, soil, climatic, and topographic variables & 372 (344 + 28) \\ \hline
5 & Median composites of Sentinel-1/2 and cropland type & 369 (344 + 25 periods) \\ \hline
6 & Median composites of Sentinel-1/2 and crop rotation systems & 348 (344 + 4) \\ \hline
7 & Median composites of Sentinel-1/2, soil, climatic, topographic variables, cropland type, and crop rotation systems & 401 (344 + 28 + 25 + 4) \\ \hline \hline \end{tabular}
\end{table}
Table 3: Different combinations of environmental variables.  
model performances, and record the model with the best performance; (4) update the pool by taking the variables from the best model in the last step; (5) repeat steps 3 and 4 by increasing the number of variables from three to \(n\). The variables in the model with the best performance are selected for the final model. To improve computational efficiency, the \"early stop\" function was activated when the model performance started to decrease. More details on MGFS can be found in [53].