EventsThe 3rd International Online Conference on Agriculture
Published
This submission belongs to the session S6. Smart Farming: From Sensor to Artificial Intelligence of the event The 3rd International Online Conference on Agriculture
Published date
20 Oct, 2025
Academic Editor
author-avatarSanzidur Rahman
Citation
Nurudeen Mahmud Ibrahim, An IoT-Based Anomaly Detection Framework for Smart Agriculture Using Hybrid PCA and Isolation Forest, in Proceedings of The 3rd International Online Conference on Agriculture, 22 October–24 October 2025, MDPI: Basel, Switzerland
Share
Email
Facebook
Twitter
LinkedIn

An IoT-Based Anomaly Detection Framework for Smart Agriculture Using Hybrid PCA and Isolation Forest

1. Department of Cybersecurity, Nile University of Nigeria, Abuja, Nigeria, Nigeria
Abstract

The integration of Internet of Things (IoT) technologies in agriculture has advanced precision farming by enabling real-time monitoring and data-driven decision-making. However, the growing reliance on interconnected sensors introduces challenges such as cybersecurity risks, sensor failures, and data irregularities that can threaten operational reliability. This study presents an IoT-based anomaly detection framework designed to enhance the security and efficiency of smart agriculture systems. The approach employs unsupervised machine learning techniques, specifically a hybrid of Principal Component Analysis (PCA) and Isolation Forest for detecting anomalies in environmental sensor data. A publicly available smart agriculture dataset containing diverse parameters like soil moisture, temperature, humidity, and light intensity was used. The model was evaluated using accuracy, precision, recall, and F1-score metrics. The results show that the PCA + Isolation Forest model achieved a high accuracy of 98.2% and a recall of 99.4%, indicating its effectiveness in detecting true anomalies while minimizing false negatives. This performance surpasses that of standalone models such as PCA, Isolation Forest, and One-Class SVM. The proposed framework is computationally efficient and well-suited for resource-constrained IoT environments commonly found in agricultural settings. By effectively identifying data irregularities, this approach enhances the security, reliability, and operational integrity of smart farming systems, making it a practical solution for supporting sustainable and secure precision agriculture.

Keywords
Smart Agriculture
Anomaly Detection
IoT
PCA
Isolation Forest
Poster
Enhancing Multi-Trait Genetic Gains in Durum Wheat (Triticum durum Desf.) Using Ideotype-Based Selection Indices
Highly efficient direct seed transformation protocol for japonica rice (Oryza sativa L.) by Agrobacterium tumefaciens