# Efficient Argan Tree Deforestation Detection Using Sentinel-2 Time Series and Machine Learning
## 2 Materials and Methods
### Machine Learning Models  
The organ tree is a large species with thorny, horizontally spreading branches, resulting in a wide, sprawling appearance. In Sentinel-2 imagery, which has a resolution of 10 m, each organ tree typically corresponds to one to four pixels (see Figure 5). This pixel representation allows the application of machine learning algorithms to classify pixels into two previously defined categories: \"Argan\" (containing organ trees) or \"Non-Argan\" (without organ trees). Eight machine learning algorithms were selected for classifying the study area and detecting organ trees, with the objective of identifying the most effective models for this task: Support Vector Machine (SVM) [103], Decision Tree (DT) [104], Random Forest (RF) [104], LightGBM [105], XGBoost [106], Gaussian Naive Bayes [107], K-Nearest Neighbors (KNN) [108], and Artificial Neural Network (ANN) [108]. All algorithms were supervised and trained on various dataset scenarios. Each model had tunable parameters to optimize performance. Initially, all models were tested with their default parameter settings. Subsequently, parameter adjustments were made to improve the results. Table 6 highlights the key parameters for each model and the tested values, except for Gaussian Naive Bayes, which is typically used with its default settings and required no modifications. It is worth noting that other parameters were tested, but they were disregarded as they did not provide any performance improvement. The SVM, RF, KNN, and ANN algorithms are widely used in tree detection and mapping due to their proven effectiveness in handling spatial and spectral data [18], \begin{table}
\begin{tabular}{c c c} \hline \hline
**Machine Learning Model** & **Basic Parameters** & **Tested Values** \\ \hline Support Vector Machine & kernel & rbf, poly, linear, sigmoid \\ \hline \multirow{2}{*}{Decision Tree} & criterion & gini, entropy \\ \cline{2-3}  & splitter & best, random \\ \hline Random Forest & criterion & gini, entropy, log\_loss \\ \hline LightGBM & boosting\_type & gbdt, dart, goss \\ \hline XGBoost & booster & gbtree, gblinear, dart \\ \hline K-Nearest Neighbors & n\_neighbors & 2, 3, 4, 5, 6, 7, 8, 9, 10 \\ \hline \multirow{2}{*}{Artificial Neural Network} & units & \\  & (Neurons in hidden layer) & 26/24, 18, 13/12, 10 \\ \hline \hline \end{tabular}
\end{table} 
Table 6: Most significant parameters for each model and the tested values. Figure 5: Sentinel-2 pixel size (black grid) on very high-resolution Google Earth imagery. making them suitable candidates for this study. Additionally, DT, LightGBM, XGBoost, and Gaussian Naive Bayes were selected for their strong classification capabilities, as demonstrated in various remote sensing applications. Support Vector Machine (SVM) uses the principle of maximizing the margin between classes in a high-dimensional feature space, leading to robust performance, especially in high-dimensional or small-sample scenarios [109]. Decision Tree (DT) constructs a hierarchical structure of if-then rules by recursively partitioning the feature space, offering ease of interpretation due to its rule-based nature [110]. Random Forest (RF) is an ensemble method that aggregates multiple decision trees grown on bootstrap samples, enhancing predictive accuracy and reducing overfitting [111]. LightGBM relies on a gradient boosting framework and employs a leaf-wise tree growth strategy with histogram-based decision rules, enabling faster training on large-scale datasets [112]. Similarly, XGBoost also uses gradient boosting but incorporates second-order gradients and advanced regularization, often achieving high accuracy and efficiency in competition settings [113]. Gaussian Naive Bayes applies [PERSON] theorem under an assumption of feature independence and normal distributions, making it computationally efficient and effective with limited data [114].