Research Article Open Access

A Clustering based Approach for Contextual Anomaly Detection in Internet of Things

Dina ElMenshawy1, Waleed Helmy1 and Neamat El-Tazi1
  • 1 Cairo University, Egypt


Internet of Things (IoT) is a network which connects different communication devices with the internet to attain quick, robust and real-time information transfer and communication, achieving intelligent management. IoT is still in its infancy so it faces numerous challenges varying from data management to security concerns. Sensors generate enormous quantities of data that need to be handled efficiently to have successful deployment of IoT applications. Concerning data management, a great challenge that faces the IoT environment is the detection of contextual anomalies. Contextual anomaly detection is a sophisticated task because the context has to be taken into consideration in the anomaly detection process rather than checking only the deviation of the data value as in point anomaly detection. As a result, in this paper, a novel clustering based algorithm is proposed to detect contextual anomalies in Internet of Things. Attributes were separated into two different categories, namely contextual attributes and behavioral attributes. K-Means clustering technique was applied on the contextual and behavioral attributes separately, then the intersection between the contextual and behavioral clusters was used to detect the contextual anomalies. Moreover, the algorithm was applied on a real room occupation dataset of size around 20,000 records and the experiments showed promising results.

Journal of Computer Science
Volume 15 No. 8, 2019, 1195-1202


Submitted On: 23 May 2019 Published On: 24 August 2019

How to Cite: ElMenshawy, D., Helmy, W. & El-Tazi, N. (2019). A Clustering based Approach for Contextual Anomaly Detection in Internet of Things. Journal of Computer Science, 15(8), 1195-1202.

  • 5 Citations



  • Internet of Things
  • Contextual Anomaly
  • Clustering