Classifying Occupancy Levels in Smart Building by Experimental Evaluation of KNN and its Variants
Ghulam Fizza, Kushsairy Kadir, Haidawati Nasir, Sevia Mahdaliza Idrus, M. Z. Mohamed · 2024
Management of energy consumption in smart buildings is critically influenced by occupancy information. Traditional methods often operate on the premise of maximum occupancy leading to inefficient energy utilization. This study seeks to address this inefficiency by employing machine learning techniques for occupancy level classification, focusing on K-Nearest Neighbors (KNN) and its variants, Weighted KNN (W-KNN), Random Subspace Method KNN (RSM-KNN), and Feature Bagging KNN (FB-KNN). The methodology comprises a detailed exploratory data analysis, data transformation and hyperparameter optimization. The RSM-KNN model demonstrated a f1 score of 99.42% for empty and 92.65% for low occupancy level. Additionally, the W-KNN model achieved a peak accuracy of 98.13% when using normalized data. These results underscore the potential of employing KNN variants for occupancy level classification, thereby contributing to the efficient management of energy, occupancy detection and comfort in smart buildings.