Machine Learning for Accurate Office Room Occupancy Detection Using Multi-Sensor Data †
Abstract
:1. Introduction
- Systematic comparison of a wide range of ML models, from traditional to advanced ensemble methods;
- Optimizing hyperparameters of selected models in order to enhance performance;
- Evaluating custom voting and multiple stacking classifiers and demonstrating their role in improving classification performance.
2. Related Work
3. Materials and Methods
3.1. Data Collection and Preprocessing
3.2. Feature Engineering
3.3. Model Selection
- Voting Classifier, consisting of LR, RF, and SVM;
- StackingClassifier1, consisting of LR, RF, and SVM as base estimators with LR as the final estimator;
- StackingClassifier2, consisting of Decision Tree, KNN, and MLP Classifiers as base estimators with LR as the final estimator;
- Stacking Classifier3, consisting of GaussianNB, SVM, and QDA as base estimators with LR as the final estimator;
- StackingClassifier4, consisting of RF, MLP Classifier, and SVM as base estimators with LR as the final estimator.
3.4. Hyperparameter Optimization
3.5. Model Training and Evaluation
4. Results and Discussions
5. Conclusions
Author Contributions
Funding
Institutional Review Board Statement
Informed Consent Statement
Data Availability Statement
Conflicts of Interest
References
- Erickson, V.L.; Carreira-Perpiñán, M.Á.; Cerpa, A.E. Occupancy modeling and prediction for building energy management. ACM Trans. Sens. Netw. (TOSN) 2014, 10, 1–28. [Google Scholar] [CrossRef]
- Kim, Y.-M.; Lee, Y.-H.; Pyo, C.-S. Accurate Occupancy Detection via Label Noise Filtering Technique. In Proceedings of the 2020 International Conference on Information and Communication Technology Convergence (ICTC), Jeju Island, Republic of Korea, 21–23 October 2020; pp. 1381–1383. [Google Scholar]
- Brooks, J.; Kumar, S.; Goyal, S.; Subramany, R.; Barooah, P. Energy-efficient control of under-actuated HVAC zones in commercial buildings. Energy Build. 2015, 93, 160–168. [Google Scholar] [CrossRef]
- Zemouri, S.; Gkoufas, Y.; Murphy, J. A machine learning approach to indoor occupancy detection using non-intrusive environmental sensor data. In Proceedings of the Proceedings of the 3rd International Conference on Big Data and Internet of Things, Melbourn, Australia, 22–24 August 2019; pp. 70–74. [Google Scholar]
- Zhao, H.; Hua, Q.; Chen, H.-B.; Ye, Y.; Wang, H.; Tan, S.X.-D.; Tlelo-Cuautle, E. Thermal-sensor-based occupancy detection for smart buildings using machine-learning methods. ACM Trans. Des. Autom. Electron. Syst. (TODAES) 2018, 23, 1–21. [Google Scholar] [CrossRef]
- Toutiaee, M. Occupancy detection in room using sensor data. arXiv 2021, arXiv:2101.03616. [Google Scholar] [CrossRef]
- Candanedo, L.M.; Feldheim, V. Accurate occupancy detection of an office room from light, temperature, humidity and CO2 measurements using statistical learning models. Energy Build. 2016, 112, 28–39. [Google Scholar] [CrossRef]
- Yang, Z.; Li, N.; Becerik-Gerber, B.; Orosz, M. A systematic approach to occupancy modeling in ambient sensor-rich buildings. Simulation 2014, 90, 960–977. [Google Scholar] [CrossRef]
- Dong, B.; Andrews, B.; Lam, K.P.; Höynck, M.; Zhang, R.; Chiou, Y.-S.; Benitez, D. An information technology enabled sustainability test-bed (ITEST) for occupancy detection through an environmental sensing network. Energy Build. 2010, 42, 1038–1046. [Google Scholar] [CrossRef]
- Lam, K.P.; Höynck, M.; Dong, B.; Andrews, B.; Chiou, Y.-S.; Zhang, R.; Benitez, D.; Choi, J. Occupancy detection through an extensive environmental sensor network in an open-plan office building. IBPSA Build. Simul. 2009, 145, 1452–1459. [Google Scholar]
- Zuraimi, M.; Pantazaras, A.; Chaturvedi, K.; Yang, J.; Tham, K.; Lee, S. Predicting occupancy counts using physical and statistical Co2-based modeling methodologies. Build. Environ. 2017, 123, 517–528. [Google Scholar] [CrossRef]
- Kraipeerapun, P.; Amornsamankul, S. Room occupancy detection using modified stacking. In Proceedings of the 9th International Conference on Machine Learning and Computing, Singapore, 24–26 February 2017; pp. 162–166. [Google Scholar]
- Dutta, J.; Roy, S. OccupancySense: Context-based indoor occupancy detection & prediction using CatBoost model. Appl. Soft Comput. 2022, 119, 108536. [Google Scholar] [CrossRef]
- Elkhoukhi, H.; Bakhouya, M.; El Ouadghiri, D.; Hanifi, M. Using stream data processing for real-time occupancy detection in smart buildings. Sensors 2022, 22, 2371. [Google Scholar] [CrossRef] [PubMed]
Model | Average Accuracy | Average Precision | Average Recall | Average F1-Score |
---|---|---|---|---|
SVM | 0.9865 ± 0.0096 | 0.9500 ± 0.0368 | 0.9958 ± 0.0016 | 0.9720 ± 0.0193 |
LR | 0.9888 ± 0.0070 | 0.9582 ± 0.0280 | 0.9958 ± 0.0029 | 0.9764 ± 0.0144 |
KNN | 0.9639 ± 0.0102 | 0.9283 ± 0.0145 | 0.9151 ± 0.0582 | 0.9204 ± 0.0245 |
DT | 0.8363 ± 0.1437 | 0.7511 ± 0.2595 | 0.8419 ± 0.1246 | 0.7477 ± 0.1506 |
NB | 0.9368 ± 0.0249 | 0.7915 ± 0.0654 | 0.9983 ± 0.0011 | 0.8814 ± 0.0410 |
MLP | 0.9699 ± 0.0162 | 0.9375 ± 0.0504 | 0.9377 ± 0.0806 | 0.9340 ± 0.0375 |
QDA | 0.9482 ± 0.0393 | 0.8359 ± 0.1150 | 0.9954 ± 0.0024 | 0.9042 ± 0.0680 |
Model | Accuracy | Precision | Recall | F1-Score |
---|---|---|---|---|
SVM | 0.9906 | 0.9644 | 0.9958 | 0.9798 |
LR | 0.9904 | 0.9650 | 0.9943 | 0.9794 |
KNN | 0.9908 | 0.9735 | 0.9866 | 0.9800 |
DT | 0.9911 | 0.9809 | 0.9802 | 0.9805 |
NB | 0.9668 | 0.8748 | 0.9979 | 0.9323 |
MLP | 0.9531 | 0.8311 | 0.9986 | 0.9072 |
QDA | 0.9825 | 0.9342 | 0.9936 | 0.9630 |
Model | Accuracy | Precision | Recall | F1-Score |
---|---|---|---|---|
RF | 0.8589 ± 0.1249 | 0.7783 ± 0.2526 | 0.8703 ± 0.1073 | 0.7797 ± 0.1361 |
Bagging | 0.9337 ± 0.0167 | 0.8925 ± 0.0908 | 0.8360 ± 0.1174 | 0.8516 ± 0.0424 |
AdaBoost | 0.9352 ± 0.0283 | 0.8180 ± 0.1023 | 0.9530 ± 0.0291 | 0.8754 ± 0.0479 |
GBoosting | 0.9552 ± 0.0200 | 0.8962 ± 0.0949 | 0.9322 ± 0.0435 | 0.9084 ± 0.0326 |
ExtraTrees | 0.9140 ± 0.0266 | 0.8075 ± 0.0496 | 0.8311 ± 0.1465 | 0.8115 ± 0.0740 |
Voting | 0.9861 ± 0.0096 | 0.9488 ± 0.0368 | 0.9954 ± 0.0018 | 0.9711 ± 0.0194 |
Stacking1 | 0.9889 ± 0.0072 | 0.9593 ± 0.0285 | 0.9952 ± 0.0026 | 0.9767 ± 0.0149 |
Stacking2 | 0.9765 ± 0.0119 | 0.9359 ± 0.0473 | 0.9682 ± 0.0366 | 0.9505 ± 0.0244 |
Stacking3 | 0.9880 ± 0.0082 | 0.9579 ± 0.0335 | 0.9933 ± 0.0051 | 0.9749 ± 0.0168 |
Stacking4 | 0.9874 ± 0.0098 | 0.9541 ± 0.0385 | 0.9952 ± 0.0028 | 0.9738 ± 0.0199 |
Model | Accuracy | Precision | Recall | F1-Score |
---|---|---|---|---|
RF | 0.9935 | 0.9838 | 0.9880 | 0.9859 |
Bagging | 0.9914 | 0.9823 | 0.9802 | 0.9812 |
AdaBoost | 0.9903 | 0.9675 | 0.9908 | 0.9790 |
GBoosting | 0.9908 | 0.9709 | 0.9894 | 0.9800 |
ExtraTrees | 0.9932 | 0.9858 | 0.9844 | 0.9851 |
Voting | 0.9906 | 0.9657 | 0.9943 | 0.9798 |
Stacking1 | 0.9932 | 0.9824 | 0.9880 | 0.9852 |
Stacking2 | 0.9921 | 0.9789 | 0.9866 | 0.9827 |
Stacking3 | 0.9885 | 0.9577 | 0.9936 | 0.9754 |
Stacking4 | 0.9930 | 0.9811 | 0.9887 | 0.9849 |
Model | Accuracy | Precision | Recall | F1-Score |
---|---|---|---|---|
Grid-SVM | 0.9887 | 0.9683 | 0.9957 | 0.9818 |
Grid-KNN | 0.9920 | 0.9703 | 0.9946 | 0.9823 |
Grid-RF | 0.9939 | 0.9807 | 0.9924 | 0.9865 |
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2023 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).
Share and Cite
Ibrahim, Y.; Bagaye, U.Y.; Muhammad, A.I. Machine Learning for Accurate Office Room Occupancy Detection Using Multi-Sensor Data. Eng. Proc. 2023, 58, 67. https://doi.org/10.3390/ecsa-10-16019
Ibrahim Y, Bagaye UY, Muhammad AI. Machine Learning for Accurate Office Room Occupancy Detection Using Multi-Sensor Data. Engineering Proceedings. 2023; 58(1):67. https://doi.org/10.3390/ecsa-10-16019
Chicago/Turabian StyleIbrahim, Yusuf, Umar Yusuf Bagaye, and Abubakar Ibrahim Muhammad. 2023. "Machine Learning for Accurate Office Room Occupancy Detection Using Multi-Sensor Data" Engineering Proceedings 58, no. 1: 67. https://doi.org/10.3390/ecsa-10-16019