css

Context-Sensitive Systems (CSS) - Lab Tasks

Sensor data collection, analysis, and machine learning for human activity recognition.

Overview

This repository contains four lab tasks focused on sensor-based activity recognition:

  1. Task 1: Web-based sensor data collection (orientation, accelerometer, gyroscope)
  2. Task 2: Time series feature extraction with sliding windows
  3. Task 3: Activity classification with 9 ML algorithms and LOSO cross-validation
  4. Task 4: Hyperparameter optimization using Bayesian methods and Optuna

Quick Start

# Clone the repository
git clone https://github.com/LiliVanilli/css.git
cd css

# Navigate to specific task
cd task1  # or task2, task3, task4

Task Summaries

Task 1: Sensor Data Collection

Task 2: Feature Extraction

Task 3: Activity Classification

Task 4: Hyperparameter Optimization

Key Results

Task Method Result Improvement
Task 1 Data Collection Web app with 3 sensors -
Task 2 Feature Extraction Sliding windows + stats -
Task 3 Random Forest (LOSO) F1 = 0.518 Baseline
Task 4 Bayesian Optimization F1 = 0.770 +48.6%

Technologies

Repository Structure

css/
├── task1/                  # Web sensor data collection
│   ├── index.html
│   ├── script.js
│   └── README.md
├── task2/                  # Feature extraction
│   ├── analysis.ipynb
│   └── README.md
├── task3/                  # ML classification
│   ├── classification_clean.ipynb
│   └── README.md
├── task4/                  # Hyperparameter optimization
│   ├── hyperparameter_optimization.ipynb
│   └── README.md
└── README.md              # This file

Installation

Each task has its own dependencies. Navigate to the task folder and follow its README.

For Python tasks (2, 3, 4):

cd task3  # or task2, task4
pip install -r requirements.txt
jupyter notebook

For web task (1):

cd task1
npm install
open index.html

Author

LiliVanilli

License

MIT