Lightweight Network Intrusion Detection in IoT Environments Using Machine Learning
Keywords:
IoT Security, Intrusion Detection System (IDS), oTID20 Dataset, Machine Learning, Support Vector Machine (SVM), Random Forest, Decision Tree, Pearson Correlation, Imbalanced Dataset, Min-Max Scaling, Feature Selection, One-Versus-Rest (OVR)Abstract
With the rapid expansion of IoT devices, network intrusion security has indeed become a major issue. This work introduces a machine learning-based IDS using the IoTID20 dataset representing the imbalanced real-world network traffic. Data preprocessing pipeline converts categorical attributes into numerical attributes through Label Encoding, normalizes data via Min-Max Scaling, and selects features using Pearson Correlation. Three classifiers, the Support Vector Machine (SVM) based on One-Versus-Rest, Decision Tree, and Random Forest, have been evaluated. The SVM achieved an accuracy of 83%, while Decision Tree and Random Forest achieved 89.06% and 96.02% respectively. It is evident from the above results that with the correct preprocessing and feature selection, the detection performance can be greatly affected even on imbalanced datasets. The built system thus functions as an accurate yet lightweight IDS solution that can be deployed in resource-limited IoT environments.











