## 2 Materials and Methods
### Susceptibility Modeling  
This study aimed to identify the conditioning factors that may influence the occurrence of landslide and flooding events. To achieve this, the XGBoost machine learning model was applied and the SHAP method (SHapley Additive exPlanation) was employed to assess and validate the model. The methodological workflow is illustrated in Figure 4 and is systematically outlined in the following five steps. 1. In the initial phase, pre-processing and raster data preparation (10 conditioning factors) were carried out, which allowed us to (1) align the raster cells to ensure spatial consistency among data from different sources; (2) convert raster data into 1D vectors to simplify processing; (3) reduce the raster resolution by 80% to optimize data management; (4) visualize raster data to visually identify patterns or anomalies. 2. In the data conversion and cleaning phase, the following steps were performed: (1) replace NoData values with NaN to properly handle missing data; (2) apply numeric encoding of categorical variables such as land use and lithology; (3) transform raster data from 2D matrices to 1D vectors to simplify data handling; (4) create a DataFrame containing the raster variables and target for analysis; (5) remove NaN values to ensure a complete dataset ready for analysis. \begin{table}
\begin{tabular}{c c c} \hline
**Data** & **Source/Scale** & **Map** \\ \hline Distance to network & Derived & \\ \hline Drainage density & Derived & \\ \hline Land Use & [[https://rsdi.regione.basilicata.it/](https://rsdi.regione.basilicata.it/)]([https://rsdi.regione.basilicata.it/](https://rsdi.regione.basilicata.it/)) (accessed on 2 May 2025) & \\ \hline Lithology & (1:50,000) & \\ \hline \end{tabular}
\end{table} 
Table 1: _Cont._Subsequently, a correlation analysis was performed between the conditioning factors and the targeted variables, i.e., the flooded areas and the landslide areas [27]. The analysis was conducted by applying [PERSON]'s correlation coefficient, which measures the relationship between two datasets: if the value is close to 1 (\(-\)1), it indicates a strong positive (negative) correlation, meaning both datasets increase (decrease) together; if the value is close to 0, it indicates no correlation. In this study, no substantial correlation was observed between the conditioning factors for both flooded and landslide-prone areas. Consequently, none of the factors were excluded from the analysis. 4. Then, the XGBoost model was trained using 70% of the dataset, while the remaining 30% was used for testing to validate the model's performance for both flood and landslide susceptibility mapping. The dataset, which included flooded and landslide areas, served as the target variable, while the 10 conditioning factors were used as predictors for susceptibility modeling. The XGBoost model, used as a supervised classification model [28], was initially introduced by [PERSON] and [PERSON] [29]. This algorithm is an optimized version of the Gradient Boosting Machine (GBM) and employs a gradient boosting framework combined with decision tree-based ensemble learning [30; 31]. XGBoost is particularly effective in reducing prediction and classification errors due to its capacity to adapt to complex and non-linear datasets. The algorithm combines weak decision trees to create a complex and accurate model. It functions by sequentially adding decision trees, with each new tree enhancing the performance of the previous one by following the gradient direction of the loss function. The objective function, which assesses the model's error during training, consists of two components: a loss function that measures the discrepancy between actual and predicted values, and a regularization term that penalizes model complexity to reduce the risk of overfitting. The XGBoost model employs optimization techniques during training, such as parallel computation to expedite tree construction, optimized splitting strategies  
Figure 4: Flow chart of the methodology.