When the Strongest Sensor Misleads: Privacy-preserving room occupancy detection from environmental sensors.
Meeting rooms are often booked and then left empty, and buildings rarely know. I tested whether low-cost environmental sensors (temperature, light, sound, CO₂ and passive-infrared motion) can detect room occupancy without cameras or tracking individuals, using the public UCI Room Occupancy Estimation dataset (10,129 thirty-second snapshots over seven days). In my first analysis, a logistic regression trained on December data and tested on January data missed 184 of 294 occupied snapshots because three people worked with the lights off; the light sensors separated the training data almost perfectly, and removing them raised recall to 1.00. I then re-evaluated the work with leave-one-day-out cross-validation, compared 17 models and rules, and stress-tested the best candidates. The single train–test split had hidden a failure: the door-side motion sensor fired seven times on an empty holiday, and my final model raised 345 false alarms on that day. A random forest given the light sensors failed exactly as the logistic regression did. Gradient boosting on backward-looking features that require corroborating evidence (motion counts, sound peaks, CO₂ rise above a trailing baseline) reached an F1 of 0.974 with a 0.9% false-alarm rate, and kept recall above 0.97 when motion was silenced for 40 minutes. Head-count accuracy fell from 99.8% under a random split to 86.4% under day-wise evaluation. Sensor-based occupancy detection is feasible, but only a day-wise evaluation shows how far it can be trusted.
Authors
- Prahlad Narayan Bhardwaj (ORCID: https://orcid.org/0009-0008-7598-1954)
Publication Details
- Journal
- Zenodo (CERN European Organization for Nuclear Research)
- Published
- 2026-09-28
- DOI
- https://doi.org/10.5281/zenodo.23009467
- Primary Topic
- Building Energy and Comfort Optimization
- Type
- preprint