[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"doc-detail-125435-en":3,"doc-seo-125435-105":30,"detail-sidebar-cat-0-en-105":91},{"code":4,"msg":5,"data":6},0,"success",{"doc_id":7,"user_id":8,"nickname":9,"user_avatar":10,"doc_module":4,"category_id":11,"category_name":12,"doc_title":13,"doc_description":14,"doc_content":15,"file_id":16,"file_url":17,"file_type":18,"file_size":19,"view_count":4,"is_deleted":4,"is_public":20,"is_downloadable":20,"audit_status":20,"page_count":21,"language":22,"language_code":23,"site_id":24,"html_lang":23,"table_of_contents":25,"faqs":26,"seo_title":27,"seo_description":14,"update_tm":28,"read_time":29},125435,687197207919,"Theodora","https://ap-avatar.wpscdn.com/avatar/a000253d6f5f7c60be?x-image-process=image/resize,m_fixed,w_180,h_180&k=1779446848396160552",6,"Technology","Indoor Occupancy Detection Using Machine Learning and Environmental Sensors - read online","Detecting indoor occupancy in enclosed spaces supports automated HVAC control, assists elderly care and healthcare provisioning, and enables human activity recognition. Although many machine-learning approaches exist, reported prediction accuracies can be limited, and models must remain robust when sensors provide partial data. This work experimentally evaluates robust ML models for indoor occupancy detection under such disruptions, using temperature, humidity, CO2, and light sensors to train and compare six classifiers.","Indoor Occupancy Detection Using Machine Learning and  \nEnvironmental Sensors  \nAkindele Segun Afolabi 1*, Olubunmi Adewale Akinola2, Oyinlolu Ayomidotun  \nOdetoye3, Emmanuel Adetiba4,5,6  \n1Department of Electrical and Electronics Engineering, University of Ilorin, Ilorin 240003, Nigeria 2Department of Electrical and Electronic Engineering, Federal University of Agriculture, Abeokuta 110111, Nigeria 3Department of Electrical and Information Engineering, Landmark University, Omu-Aran 251103, Nigeria 4Department of Electrical and Information Engineering, Covenant University, Ota, Ogun State 112233, Nigeria 5Covenant Applied Informatics and Communication Africa Center of Excellence, Covenant University, Ota Ogun 112233, Nigeria 6HRA Institute of System Science, Durban University of Technology, Durban 4000, South Africa  \nCitation:  \nAfolabi, A. S., Akinola, O. A., Odetoye, O. A., & Adetiba, E. (2025). Indoor occupancy detection using machine learning and environmental sensors. Journal of Smart Science and Technology, 5(1), 17-39.  \nARTICLE INFO  \nArticle history:  \nReceived 13 November 2024 Revised 02 February 2025 Accepted 20 February 2025 Published 31 March 2025  \nKeywords:  \nindoor occupancy detection machine learning  \ndata leakage  \ntarget leakage random forest classifier  \ndecision trees classifier DOI:  \n10.24191/jsst.v5i1.101  \nABSTRACT  \nDetecting the occupancy status of enclosed spaces has been immensely beneficial in the automated control of HVACs (heating, ventilation, and cooling systems), providing assistance to the elderly, healthcare provisioning, recognition of human activity, and others. As a result of these benefits, a plethora of machine learning-based solutions for occupancy detection has been developed in the literature. However, many of these solutions have poor prediction accuracies. Furthermore, it is necessary to develop models that are robust enough to achieve acceptable performance in situations where partial data from sensors are available. In this paper, we experimentally determined the Machine Learning (ML) models that are most robust for use in indoor occupancy detection. This is important because the activities of human subjects inan ML environment are capable of disrupting the data available to some deployed ML models, which might cause the performance of such models to drop. Hence, it is crucial to determine ML models that are robust against such disruptions. In this paper, three algorithms were developed: the first was for outlier removal from features, the second was for feature selection, and the third was for partial-featuresavailability-aware ML model selection. These algorithms were applied to data from environmental sensors such as temperature, humidity, carbon dioxide (CO2), and light sensors, and afterward. The resulting  \n  data was used to train six different ML-based classifiers. The classifiers  \n1* Corresponding author. E-mail address: [afolabisegun@unilorin.edu.ng](afolabisegun@unilorin.edu.ng)  \nconsidered in this paper were Logistic Regression (LR), Random Forest (RF), Decision Tree (DT), K-Nearest Neighbours (KNN), Support Vector Machines (SVM), and Gradient Boosting Machines (GBM) . Simulation experiments revealed that only the RF and DT models are robust against the partial features availability problem, achieving at least 90% performance scores across all the considered metrics.  \n1 INTRODUCTION  \nHuman occupancy detection, which involves detecting the presence of people in a building, is a vital task that has, in recent times, been shown to have numerous benefits. For example, it has encouraged the creation of several smart applications in a variety of relevant contexts such as automated control of heating, ventilation, and cooling systems (HVACs) 1–3 providing assistance to the elderly4, healthcare provision5,6, recognition of human activity7,8 to name a few. Occupancy detection has also accelerated the development of smart buildings9,10 . Technologies for detecting occup","cbCaiusDQi42ySMl","https://ap.wps.com/l/cbCaiusDQi42ySMl","pdf",844025,1,23,"English","en",105,"# Introduction\n## Applications of occupancy detection\n## Approaches: physics-based vs data-driven\n## Sensor technologies and related work","[{\"question\":\"Why is indoor occupancy detection important for building systems?\",\"answer\":\"It enables automated HVAC control, supports elderly and healthcare assistance, and helps recognize human activity, improving smart building functionality.\"},{\"question\":\"What challenge does the paper focus on regarding machine learning models?\",\"answer\":\"It targets robustness when environmental sensors provide only partial feature data, which can disrupt deployed models and reduce performance.\"},{\"question\":\"Which classifiers showed robustness in the experiments?\",\"answer\":\"Random Forest and Decision Tree achieved at least 90% performance scores across the considered metrics under the partial-features availability problem.\"}]","Indoor Occupancy Detection Using Machine Learning and Environmental Sensors - read online | PDF",1785898888,58,{"code":4,"msg":31,"data":32},"ok",{"site_id":24,"language":23,"slug":33,"title":13,"keywords":34,"description":14,"schema_data":35,"social_meta":86,"head_meta":88,"extra_data":90,"updated_unix":28},"indoor-occupancy-detection-using-machine-learning-and-environmental-sensors-read-online","",{"@graph":36,"@context":85},[37,54,68],{"@type":38,"itemListElement":39},"BreadcrumbList",[40,44,48,51],{"item":41,"name":42,"@type":43,"position":20},"https://docshare.wps.com","Home","ListItem",{"item":45,"name":46,"@type":43,"position":47},"https://docshare.wps.com/document/","Document",2,{"item":49,"name":12,"@type":43,"position":50},"https://docshare.wps.com/document/technology/",3,{"item":52,"name":13,"@type":43,"position":53},"https://docshare.wps.com/document/indoor-occupancy-detection-using-machine-learning-and-environmental-sensors-read-online/125435/",4,{"url":52,"name":13,"@type":55,"author":56,"headline":13,"publisher":58,"fileFormat":61,"inLanguage":23,"description":14,"dateModified":62,"datePublished":62,"encodingFormat":61,"isAccessibleForFree":63,"interactionStatistic":64},"DigitalDocument",{"name":9,"@type":57},"Person",{"url":41,"name":59,"@type":60},"DocShare","Organization","application/pdf","2026-08-05",true,{"@type":65,"interactionType":66,"userInteractionCount":4},"InteractionCounter",{"@type":67},"ViewAction",{"@type":69,"mainEntity":70},"FAQPage",[71,77,81],{"name":72,"@type":73,"acceptedAnswer":74},"Why is indoor occupancy detection important for building systems?","Question",{"text":75,"@type":76},"It enables automated HVAC control, supports elderly and healthcare assistance, and helps recognize human activity, improving smart building functionality.","Answer",{"name":78,"@type":73,"acceptedAnswer":79},"What challenge does the paper focus on regarding machine learning models?",{"text":80,"@type":76},"It targets robustness when environmental sensors provide only partial feature data, which can disrupt deployed models and reduce performance.",{"name":82,"@type":73,"acceptedAnswer":83},"Which classifiers showed robustness in the experiments?",{"text":84,"@type":76},"Random Forest and Decision Tree achieved at least 90% performance scores across the considered metrics under the partial-features availability problem.","https://schema.org",{"og:url":52,"og:type":87,"og:title":13,"og:site_name":59,"og:description":14},"article",{"robots":89,"canonical":52},"index,follow",{"doc_id":7,"site_id":24},{"code":4,"msg":5,"data":92},[93,97,101,105,110,113,118,123,128,131,135],{"id":20,"doc_module":4,"doc_module_name":46,"category_name":94,"show_sort_weight":95,"slug":96},"Story & Novel",90,"story-novel",{"id":47,"doc_module":4,"doc_module_name":46,"category_name":98,"show_sort_weight":99,"slug":100},"Literature",80,"literature",{"id":53,"doc_module":4,"doc_module_name":46,"category_name":102,"show_sort_weight":103,"slug":104},"Exam",70,"exam",{"id":106,"doc_module":4,"doc_module_name":46,"category_name":107,"show_sort_weight":108,"slug":109},5,"Comic",60,"comic",{"id":11,"doc_module":4,"doc_module_name":46,"category_name":12,"show_sort_weight":111,"slug":112},50,"technology",{"id":114,"doc_module":4,"doc_module_name":46,"category_name":115,"show_sort_weight":116,"slug":117},7,"Healthcare",40,"healthcare",{"id":119,"doc_module":4,"doc_module_name":46,"category_name":120,"show_sort_weight":121,"slug":122},8,"Research & Report",30,"research-report",{"id":124,"doc_module":4,"doc_module_name":46,"category_name":125,"show_sort_weight":126,"slug":127},9,"Religion & Spirituality",20,"religion-spirituality",{"id":126,"doc_module":4,"doc_module_name":46,"category_name":129,"show_sort_weight":126,"slug":130},"World Cup","world-cup",{"id":132,"doc_module":4,"doc_module_name":46,"category_name":133,"show_sort_weight":132,"slug":134},10,"Lifestyle","lifestyle",{"id":136,"doc_module":4,"doc_module_name":46,"category_name":137,"show_sort_weight":106,"slug":138},19,"General","general"]