| Issue |
E3S Web Conf.
Volume 726, 2026
The Second International Congress on Environment, Energy, and Materials for Sustainable Development Technology (IC2EM-SDT’26)
|
|
|---|---|---|
| Article Number | 01015 | |
| Number of page(s) | 4 | |
| DOI | https://doi.org/10.1051/e3sconf/202672601015 | |
| Published online | 13 July 2026 | |
Machine learning-based water stress detection using wireless sensor network data
1 ISIC-TEAM, L2ISEI Laboratory – ESTM, Moulay Ismail University, Meknes, Morocco
2 ACTE-TEAM, EDS Laboratory – FSE, Mohammed V University of Rabat, Morocco
Abstract
Smart agriculture is increasingly recognized as a key solution for improving agricultural productivity while reducing environmental impact and water consumption. The integration of Internet of Things (IoT) technologies and Wireless Sensor Networks (WSNs) enables continuous monitoring of environmental conditions in agricultural fields. These sensing infrastructures generate large volumes of environmental data that can be exploited using Machine Learning techniques in order to support intelligent decision-making.
This study investigates the application of supervised Machine Learning algorithms for the detection of soil water stress using real environmental data. The objective is to identify the most suitable algorithm for integration into intelligent irrigation systems deployed in smart agriculture environments.
A real dataset collected at the Yanco Agricultural Research Institute in Australia was used in this study. The dataset contains 6,623 time-stamped observations recorded between June and August 2018. The measurements include soil moisture and soil temperature values captured at a depth of 0–5 cm by sensors deployed in a Wireless Sensor Network.
Three Machine Learning algorithms were evaluated and compared: K-Nearest Neighbors (KNN), Support Vector Machine (SVM), and Logistic Regression (LR). These models were selected because they represent lightweight and computationally efficient methods suitable for integration in IoT-based agricultural systems.
Data preprocessing included cleaning erroneous measurements, converting decimal values, and defining a stress threshold derived from the 25th percentile of soil moisture values combined with temperature conditions. The dataset was divided chronologically into training and testing sets using a 70%−30% split. A Time-Series-Split validation strategy was adopted in order to preserve the temporal characteristics of the data.
The performance of the models was evaluated using several classification metrics including accuracy, precision, recall, F1-score, Area Under the ROC Curve (AUC), and confusion matrices.
Experimental results show that the KNN model significantly outperforms the other methods, achieving an accuracy of 99.6%, precision of 99.0%, recall of 98.4%, and an AUC value of 0.998. The SVM model obtained a perfect recall score but produced a very high number of false positive predictions, which may lead to unnecessary irrigation events. Logistic Regression demonstrated moderate accuracy but failed to detect most water stress events due to its very low recall.
The results demonstrate that KNN provides the best balance between detection reliability and false alarm reduction. This makes it particularly suitable for integration in IoT-based irrigation management systems where both precision and energy efficiency are critical.
The findings of this research contribute to the development of data-driven decision support systems for sustainable agriculture. Future work will focus on integrating additional environmental variables, expanding the dataset, and deploying the model on edge computing platforms for real-time irrigation control.
Key words: Smart Agriculture / Wireless Sensor Networks (WSN) / Machine Learning / Water Stress Detection / KNearest Neighbors (KNN)
© The Authors, published by EDP Sciences, 2026
This is an Open Access article distributed under the terms of the Creative Commons Attribution License 4.0, which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.
Current usage metrics show cumulative count of Article Views (full-text article views including HTML views, PDF and ePub downloads, according to the available data) and Abstracts Views on Vision4Press platform.
Data correspond to usage on the plateform after 2015. The current usage metrics is available 48-96 hours after online publication and is updated daily on week days.
Initial download of the metrics may take a while.

