TOF Sensor Activity Prediction – Model and Output

This repository contains the trained machine learning model and evaluation output for a project that uses time-of-flight (TOF) sensor data to predict activity levels near a doorway.

Context and Use

The data originates from a TOF sensor placed near a door (150 cm height, 60 cm offset), recording distance measurements. Measurements under 700 mm were filtered out, and the remaining data was aggregated into 10-minute activity counts.

The model was trained on a dataset hosted on dbrepo, stored under the database ID 2db2301f-c701-4d9e-a1d1-3d2d64fa9dd9. The data consists of aggregated TOF sensor measurements and includes timestamped distance readings filtered and resampled into 10-minute activity intervals.

Files Included

  • output_model.pkl: Trained regression model using scikit-learn's HistGradientBoostingRegressor
  • test_predictions_plot.png: Visualisation comparing predicted vs actual activity counts on the test set

Model Info

  • Model type: Gradient Boosted Tree Regressor (Poisson loss)
  • Features used: Hour, Minute, DayOfWeek, Weekend (binary)
  • Target: Aggregated activity counts in 10-minute bins
  • Evaluation: Mean Absolute Error, R² score on holdout test data

Environment

  • Python 3.12
  • Libraries: scikit-learn, matplotlib, pandas

Licensing & Attribution

This work was created by Raphael [Last Name] at TU Wien. The code and model are provided under the CC-BY 4.0 license.

Related

This project is part of the 2025 Summer Semester coursework for Data Stewardship course.