Environmental monitoring is crucial for addressing challenges related to climate change,water resource management, and disaster risk mitigation. This study advances the application of machine learning techniques for anomaly detection and forecasting of temperature and groundwater, focusing on temperature anomalies in Ticino, Switzerland, and groundwater level (GWL) fluctuations in Mendatica and Triora, Italy. By integrating these two domains, this research develops a scalable and accurate approach to enhance real-time environmental monitoring. Hydrometeorological data often exhibit complex, non-linear relationships that conventional statistical models struggle to capture. This study employs advanced machine learning models, including Gated Recurrent Unit (GRU), Multi-Layer Perceptron (MLP), and the Prophet model,to enhance real-time anomaly detection and forecasting. Additionally, statistical models and machine learning models such as Auto-Regressive Integrated Moving Average (ARIMA),Seasonal ARIMA (SARIMA), Support Vector Machine (SVM) and Recurrent Nerural Network-Gated Recurrent Unit (RNN-GRU) are utilized to provide a comparative assessment of traditional forecasting techniques against machine learning-based approaches. The methodological framework significantly improves predictive capabilities, with broad applications in disaster preparedness, water resource management, and climate change adaptation. The research methodology follows a structured approach, beginning with data collection from temperature sensors in Ticino, and piezometers in Mendatica and Triora. The acquired data undergo preprocessing to remove inconsistencies, ensuring high-quality input for analysis. A machine learning-driven anomaly detection framework is implemented to identify outliers in time-series data. The study further explores the rainfall-groundwater relationship using time-lagged correlation and clustering techniques to analyse its spatial variability. The forecasting component moves from single-step to multi-step predictions, improving long-term monitoring of environmental changes. Model performance is assessed using error metrics such as Mean Absolute Error (MAE), Root Mean Squared Error (RMSE), and the coefficient of determination (R²). The anomaly detection framework demonstrated high effectiveness in identifying erroneous hydro-meteorological sensor data. The MLP model exhibited the highest anomaly detection performance, achieving a precision of 0.97 and recall of 0.96, confirming its robustness in distinguishing sensor errors from actual environmental variations. The model effectively detected outliers in temperature sensors deployed in Ticino, reducing false positives and improving the reliability of real-time environmental monitoring. Additionally, the Prophet model, while capable of capturing broader trends, exhibited lower accuracy in anomaly detection due to its sensitivity to short-term fluctuations. These findings emphasize the need for deep-learning-based models like MLP for real-time anomaly detection in hydro-meteorological applications. For GWL forecasting, the GRU model significantly outperformed statistical approaches,demonstrating superior predictive accuracy over various forecasting horizons. The piezometers Piezo_31 achieved an R² of 0.99, while Piezo_SMT13 and Piezo_S4 attained R² values of 0.98, indicating excellent model performance in capturing hydrological trends. The multi-step forecasting framework extended predictions up to 21 days ahead, with GRU maintaining an R² of 0.96 for piezometers SMT10 and 0.91 for SMT13, highlighting its ability to maintain predictive stability even over longer horizons. Time-lagged correlation analysis revealed notable spatial variability in groundwater responses to rainfall, with a maximum lag time of 2 to 6 days, indicating site-specific hydrological interactions. The Prophet model, while effective for long-term forecasting, exhibited lower accuracy for short-term predictions, reinforcing the necessity of using recurrent deep learning models for dynamic groundwater level forecasting. These results demonstrate the robustness of machine learning techniques in improving the accuracy and reliability of groundwater forecasting, particularly for landslide-prone regions like Mendatica and Triora. This study demonstrates how machine learning can help in predicting environmental changes, detecting risks like landslides, and improving water management. By using advanced technology, scientists and policymakers can enhance early warning systems and make better decisions to protect communities. This research is conducted as part of the CLOE-Training to complexity: multidisciplinary approaches to rural and mountain sustainable development and conservation PhD Program, funded under the H2020-MSCA-COFUND-2020 scheme (G.A. n 101034449). Future work should focus on implementing these methods in real-world monitoring systems,ensuring they are used effectively to prevent disasters and safeguard lives.
Exploring Machine Learning Models to Detect Outliers and Multistep Forecasting of Temperature and Groundwater Sensor Networks
PARVEZ, IRAM
2026-11-13
Abstract
Environmental monitoring is crucial for addressing challenges related to climate change,water resource management, and disaster risk mitigation. This study advances the application of machine learning techniques for anomaly detection and forecasting of temperature and groundwater, focusing on temperature anomalies in Ticino, Switzerland, and groundwater level (GWL) fluctuations in Mendatica and Triora, Italy. By integrating these two domains, this research develops a scalable and accurate approach to enhance real-time environmental monitoring. Hydrometeorological data often exhibit complex, non-linear relationships that conventional statistical models struggle to capture. This study employs advanced machine learning models, including Gated Recurrent Unit (GRU), Multi-Layer Perceptron (MLP), and the Prophet model,to enhance real-time anomaly detection and forecasting. Additionally, statistical models and machine learning models such as Auto-Regressive Integrated Moving Average (ARIMA),Seasonal ARIMA (SARIMA), Support Vector Machine (SVM) and Recurrent Nerural Network-Gated Recurrent Unit (RNN-GRU) are utilized to provide a comparative assessment of traditional forecasting techniques against machine learning-based approaches. The methodological framework significantly improves predictive capabilities, with broad applications in disaster preparedness, water resource management, and climate change adaptation. The research methodology follows a structured approach, beginning with data collection from temperature sensors in Ticino, and piezometers in Mendatica and Triora. The acquired data undergo preprocessing to remove inconsistencies, ensuring high-quality input for analysis. A machine learning-driven anomaly detection framework is implemented to identify outliers in time-series data. The study further explores the rainfall-groundwater relationship using time-lagged correlation and clustering techniques to analyse its spatial variability. The forecasting component moves from single-step to multi-step predictions, improving long-term monitoring of environmental changes. Model performance is assessed using error metrics such as Mean Absolute Error (MAE), Root Mean Squared Error (RMSE), and the coefficient of determination (R²). The anomaly detection framework demonstrated high effectiveness in identifying erroneous hydro-meteorological sensor data. The MLP model exhibited the highest anomaly detection performance, achieving a precision of 0.97 and recall of 0.96, confirming its robustness in distinguishing sensor errors from actual environmental variations. The model effectively detected outliers in temperature sensors deployed in Ticino, reducing false positives and improving the reliability of real-time environmental monitoring. Additionally, the Prophet model, while capable of capturing broader trends, exhibited lower accuracy in anomaly detection due to its sensitivity to short-term fluctuations. These findings emphasize the need for deep-learning-based models like MLP for real-time anomaly detection in hydro-meteorological applications. For GWL forecasting, the GRU model significantly outperformed statistical approaches,demonstrating superior predictive accuracy over various forecasting horizons. The piezometers Piezo_31 achieved an R² of 0.99, while Piezo_SMT13 and Piezo_S4 attained R² values of 0.98, indicating excellent model performance in capturing hydrological trends. The multi-step forecasting framework extended predictions up to 21 days ahead, with GRU maintaining an R² of 0.96 for piezometers SMT10 and 0.91 for SMT13, highlighting its ability to maintain predictive stability even over longer horizons. Time-lagged correlation analysis revealed notable spatial variability in groundwater responses to rainfall, with a maximum lag time of 2 to 6 days, indicating site-specific hydrological interactions. The Prophet model, while effective for long-term forecasting, exhibited lower accuracy for short-term predictions, reinforcing the necessity of using recurrent deep learning models for dynamic groundwater level forecasting. These results demonstrate the robustness of machine learning techniques in improving the accuracy and reliability of groundwater forecasting, particularly for landslide-prone regions like Mendatica and Triora. This study demonstrates how machine learning can help in predicting environmental changes, detecting risks like landslides, and improving water management. By using advanced technology, scientists and policymakers can enhance early warning systems and make better decisions to protect communities. This research is conducted as part of the CLOE-Training to complexity: multidisciplinary approaches to rural and mountain sustainable development and conservation PhD Program, funded under the H2020-MSCA-COFUND-2020 scheme (G.A. n 101034449). Future work should focus on implementing these methods in real-world monitoring systems,ensuring they are used effectively to prevent disasters and safeguard lives.I documenti in IRIS sono protetti da copyright e tutti i diritti sono riservati, salvo diversa indicazione.



