2. Project Objectives
❖Set up equipment to generate data using sensors and Raspberry Pi 3
❖Develop a basic application to count people in the room
❖Identify data outliers, correlations and trends
❖Build a model that predicts room occupancy based on sensor data provided
3. Original setup of Raspberry Pi 3 included:
1. Motion sensor
2. Door sensor
3. Temperature / Humidity sensor
Eventually, Motion sensor was eliminated and
additional sensors were added. Such as:
1. Noise sensor
2. Light (lux) sensor
3. CO2 sensor
4. Final setup of Raspberry Pi 3 with sensors
onboard.
Sensors are connected to a ‘breadboard’.
Sensors:
1. Noise sensor
2. Light (lux) sensor
3. CO2 sensor
4. Door sensor
5. Temperature / Humidity sensor
6. Bluetooth sensor (built into RasPi)
8. Image Data and Camera Set Up
Class of Saturday June 10, 2017
9. Image Data and Camera Set Up
Histogram of a picture
(vector)
10. Image Data and Camera Set Up
Difference of adjacent picture histograms
11. Data Wrangling and Analysis
Issues to be dealt with:
❖Different Intervals
❖Missing Values
❖Outliers
❖Feature Correlation
❖Class Imbalance
Our approach:
Step 1
Data Ready for Machine Learning
Dropped non-personal bluetooth
devices
Resample the data by taking the mean
per minute
Used EDA for outliers detection and
treatment; dealt with missing data
Step 2
Step 3
Step 4
15. Feature Correlation
❖ Dropped Non-Personal Bluetooth
Devices Feature
● Missing before April 8
● Perfectly correlated with Bluetooth
Devices (Pearson score = 1)
16. Machine Learning
❖Missing Data
➢ Sensor Errors
➢ New features
❖Time Series Data Challenges
➢ TrainTestSplit
➢ CART Models
❖Imbalanced Data
➢ occupancy_category
■ 0: Empty
19. Conclusions
❖The use of the dashboard allows the optimization of
electricity in terms of A/C and light switches
❖The sensor setup schema might be used for a larger
project that involves such data collection
❖Safety feature. The room occupancy can provide
accurate information on the amount of people in the
room in case of an emergency and help act quickly
to save lives
20. Limitations & Next Steps
Data Ingestion Optimization:
❖ Continuous work of sensors
❖ Reconciliation of intervals for features
❖ Locations with less temperature control
❖ Longer time frame (years)
❖ Multiple rooms at the same location
Model Optimization:
❖ Include the effects of weather on
temperature & humidity
❖ Detect monthly / seasonal patterns
Limitations:
● Prediction specific to the location
● Implementation cost, user privacy,
detection accuracy and intrusiveness
21. References
Allen, Joseph G., Piers Macnaughton, Usha Satish, Suresh Santanam, Jose Vallarino, and John D. Spengler. "Associations of
Cognitive Function Scores with Carbon Dioxide, Ventilation, and Volatile Organic Compound Exposures in Office Workers: A
Controlled Exposure Study of Green and Conventional Office Environments." Environmental Health Perspectives 124, no. 6
(June 26, 2015): 805-12.
Candanedo, Luis M., and Véronique Feldheim. "Accurate occupancy detection of an office room from light, temperature, humidity
and CO2 measurements using statistical learning models." Energy and Buildings 112 (January 15, 2016): 28-39.
Jiang, Chaoyang, Mustafa K. Masood, Yeng Chai Soh, and Hua Li. "Indoor occupancy estimation from carbon dioxide
concentration." Energy and Buildings 131 (2016): 132-41.