Machine learning (ML) algorithms are extensively used with outstanding prediction accuracy. However, in some cases, their overfitting capabilities, along with inadvertent biases, might produce overly optimistic results. Spatial data are a special kind of data that could introduce biases to ML due to their intrinsic spatial autocorrelation. To address this issue, a special resampling method has emerged called spatial cross-validation (SCV). The purpose of this study was to evaluate the performance of SCV compared with conventional random cross-validation (CCV) used in most ML studies. Multiple ML models were created with CCV and SCV to predict groundwater electrical conductivity (EC) with data (A) from Rhodope, Greece, in the summer of 2020; (B) from the same area but at a different time (summer 2019); and (C) from a new area (the Salento peninsula, Italy). The results showed that the SCV provides ML models with superior generalization capabilities and, hence, better prediction results in new unknown data. The SCV seems to be able to capture the spatial patterns in the data while also reducing the over-optimism bias that is often associated with CCV methods. Based on the results, SCV could be applied with ML in studies that use spatial data.
Assessing the hydrogeochemical evolution of groundwater is a challenging task, which is further exacerbated when considering the multiple geogenic and anthropogenic impacts that affect its quality and the hydraulic interactions between different aquifer bodies. This study combined hydrogeochemical modelling and data analysis to assess this complex hydrogeological regime. Before modelling, the groundwater samples were clustered using a multivariate statistical method (hierarchical cluster analysis (HCA)). Then, the Geochemist Workbench (GWB) software was applied to model the hydrogeochemical groundwater evolution, including the dominant ion exchange process, and to explain the changes in groundwater chemistry towards its flow. The input data consisted of five key parameters from seventy-seven sampling points collected in two periods (accounting for the start and the end of the irrigation period). A data analytical approach based on the optimal mixing ratios between the interacting groundwater systems and recharge inputs was also performed as part of the methodological approach. It revealed a progressively temporal-dependent behaviour of the aquifer system during the irrigation period, resulting in seasonal changes in the hydrodynamic conditions and depletion of the upper aquifer layers. Specifically, the aquifer system was confirmed to undergo cation exchange as the dominant geochemical process that increases calcium concentrations. The complex hydrogeological regime was further evaluated by assessing the mixing ratios of the different aquifer layers. Hence, the aquifer system (bulk samples) was mixed with the irrigation water by 71% and 97% and with the lateral recharge by 76% and 29% for the beginning and at the end of the irrigation period, respectively. Overall, the joint assessments were confirmed by the hydrogeochemical status of the end-members and the modelling approach and explained the sequential changes in groundwater chemistry due to the dominant ion-exchange process and the mixing of different water bodies. The proposed methodological approach proved that it could be used as an exploratory and preliminary method for capturing the temporal dynamics in complex groundwater systems and supporting groundwater resource management.