# Analysis of a Landscape Intensely Modified by Agriculture in the Tiete-Jacare Watershed, Brazil
## 2 Materials and Methods
### Methodology
#### 2.2.1 Random Forest Approach Applied in Sentinel-2 Images  
A random forest (RF) machine learning algorithm was used to generate land use and land cover maps of the study site from imagery acquired between 2016 and 2018. RF is an ensemble method and a non-parametric, supervised classifier that has been used in the last two decades in the field of remote sensing due to its high performance when dealing with a large amount of data from different sources (active or passive sensors). It is also a strong technique applicable to regression and classification problems that can be used when the response variable is quantitative or qualitative [39; 40]. In the RF method, no assumptions of normality are needed, since the algorithm can deal with highly correlated variables and is relatively insensitive to overfitting [39; 40]. Due to these attributes, this technique has become heavily used for Earth observation analyses in as much as the datasets are rarely customarily distributed and unimodal. According to [PERSON] [41], the RF classifier is built by training an ensemble of decision trees with samples drawn with replacement from the original dataset (bagging, for example). He states that individual decision trees in the ensemble are formed by the stratification of the feature space into regions by applying splitting questions on each node's samples. This means that the model creates an entire forest of random, uncorrelated decision trees to find the best possible answer [41; 42]. Figure 3 shows the architecture of the random forest model [43; 44] and the scheme to determine the class of land use and land cover in our study, where the RF method is employed to combine the results of several decision trees by utilizing a voting mechanism. At the end of the process, each tree gives a rating or a vote for a class. Herein, the final classification of each class received the highest number of options among all trees in the forest [40; 42]. \begin{table}
\begin{tabular}{c c c} \hline \hline
**Class (I)** & **Type (II)** & **Description (III)** \\ \hline \multirow{3}{*}{\begin{tabular}{c} Anthropic and \\ non-agricultural \\ \end{tabular} } & Urban and suburban areas & Urban areas and areas with rural developments (industrial and household) \\ \hline \multirow{6}{*}{\begin{tabular}{c} Anthropic-agricultural \\ \end{tabular} } & Sugar cane & \begin{tabular}{c} Cultivation of _Saccharum_ \\ _officiarum_ L. \\ \end{tabular} \\ \cline{2-3}  & \begin{tabular}{c} Citriculture \\ \end{tabular} & \begin{tabular}{c} Cultivation of _Citrus sinensis_ \\ \end{tabular} \\ \cline{2-3}  & \begin{tabular}{c} Pastures \\ \end{tabular} & \begin{tabular}{c} Predominance of herbaceous \\ vegetation (native or exotic), \\ used for extensive \\ livestock farming \\ \end{tabular} \\ \cline{2-3}  & \begin{tabular}{c} Silviculture \\ \end{tabular} & \begin{tabular}{c} Cultivation of _Eucalyptus_ spp. or _Pinus_ spp. \\ \end{tabular} \\ \cline{2-3}  & \begin{tabular}{c} Exposed soil \\ \end{tabular} & \begin{tabular}{c} Soil fallow area for cultivation \\ of _Saccharum officinarum_ L. \\ \end{tabular} \\ \hline \multirow{2}{*}{\begin{tabular}{c} Forest cover \\ \end{tabular} } & Vegetation & \begin{tabular}{c} Predominance of shrub or tree \\ vegetation (semi-deciduous \\ forest and _Cerrado_) \\ \end{tabular} \\ \hline \multirow{2}{*}{\
\begin{tabular}{c} Water resources \\ \end{tabular} } & Water &
\begin{tabular}{c} Rivers, lakes, ponds, and \\ reservoirs \\ \end{tabular} \\ \cline{2-3}  & & & \\ \end{tabular}
\end{table} 
Table 1: Description of land use and land cover classes and categories. In our study, we used Sentinel-2 L1C images. They were atmospherically corrected to L2A in SNAP 6.0 software using the Sen2 Cor (Optical Tools for Sentinel 2), and then pre-processed. The classification of land use and land cover used a machine learning RF algorithm for the years 2016, 2017, and 2018. The following Python libraries were used: NumPy; OSGeo; joblib; Gdal; pandas; sklearn.ensemble; difflib; ogr; and difflib [43].