har-classification-eval
Benchmarking Classical, Deep, and Generative Models for Human Activity Recognition — Md Meem Hossain et al. (arXiv:2501.08471, 2025)
What this evaluates
Evaluates the ability of classical, deep learning, and generative models to accurately classify human activities from sensor data. Probes temporal pattern recognition, sensor fusion handling, and generalization across varying data complexities and sensor modalities.
Datasets
- UCI-HAR — total 10299; splits: train (7352), test (2947)
- Opportunity — total 525660; splits: train (341679), test (183981)
- PAMAP2 — total 1942874; splits: train (1554297), test (388575)
- WISDM — total 1073623; splits: train (858898), test (214725)
- Berkeley MHAD — total 2401920; splits: train (1801440), test (600480)
Metrics
Accuracy (primary) — range: [0, 1]
- Ratio of correctly predicted activity labels to the total number of instances. Computed as (True Positives + True Negatives) / Total Instances.
Precision — range: [0, 1]
- Ratio of correctly predicted positive activity labels to all instances predicted as positive. Macro-averaged across classes.
Recall — range: [0, 1]
- Ratio of correctly predicted positive activity labels to all actual positive instances. Macro-averaged across classes.
F1-Score — range: [0, 1]
- Harmonic mean of Precision and Recall. Macro-averaged across classes to balance performance across all activity types.
Input / output format
Input: Time-series sensor readings (e.g., accelerometer, gyroscope) corresponding to fixed-length windows or sequences, formatted according to each dataset's standard schema.
Output: Categorical activity label (e.g., 'WALKING', 'SITTING', 'LAYING') representing the ground-truth class for the input sequence.
Scoring recipe
def compute_metrics(y_true, y_pred):
accuracy = (y_true == y_pred).mean()
precision = precision_score(y_true, y_pred, average='macro')
recall = recall_score(y_true, y_pred, average='macro')
f1 = f1_score(y_true, y_pred, average='macro')
return {'accuracy': accuracy, 'precision': precision, 'recall': recall, 'f1_score': f1}
Common pitfalls
- Fixed train/test splits are used without cross-validation, risking split-dependent variance and over-optimistic results.
- Similar postures (e.g., SITTING vs STANDING) cause high confusion, indicating models may rely on superficial features rather than robust temporal patterns.
- Perfect scores on training data (e.g., PAMAP2) signal severe overfitting, which the authors explicitly note does not guarantee generalization to unseen data.
Evidence (verbatim from paper)
In this section, we provide the findings from our comparative analysis of the machine learning models used for HAR across the selected benchmark datasets. We thoroughly analyse the performance results, focusing on key metrics such as accuracy, precision, recall, and F1-score, which are critical for determining model success in real-world scenarios.
Citation
@misc{hossain2025benchmarking,
title={Benchmarking Classical, Deep, and Generative Models for Human Activity Recognition},
author={Md Meem Hossain et al.},
year={2025},
note={arXiv:2501.08471}
}
1---2name: har-classification-eval3description: Evaluates the ability of classical, deep learning, and generative models to accurately classify human activities from sensor data. Probes temporal pattern recognition, sensor fusion handling, and generalization across varying data complexities and sensor modalities. Use when the user wants to benchmark on UCI-HAR, Opportunity, PAMAP2, WISDM, Berkeley MHAD, or asks about evaluating this task. Reports Accuracy.4---56# har-classification-eval78> Benchmarking Classical, Deep, and Generative Models for Human Activity Recognition — Md Meem Hossain et al. (arXiv:2501.08471, 2025)910## What this evaluates1112Evaluates the ability of classical, deep learning, and generative models to accurately classify human activities from sensor data. Probes temporal pattern recognition, sensor fusion handling, and generalization across varying data complexities and sensor modalities.1314## Datasets1516- **UCI-HAR** — total 10299; splits: train (7352), test (2947)17- **Opportunity** — total 525660; splits: train (341679), test (183981)18- **PAMAP2** — total 1942874; splits: train (1554297), test (388575)19- **WISDM** — total 1073623; splits: train (858898), test (214725)20- **Berkeley MHAD** — total 2401920; splits: train (1801440), test (600480)2122## Metrics2324- `Accuracy` **(primary)** — range: [0, 1]25 - Ratio of correctly predicted activity labels to the total number of instances. Computed as (True Positives + True Negatives) / Total Instances.26- `Precision` — range: [0, 1]27 - Ratio of correctly predicted positive activity labels to all instances predicted as positive. Macro-averaged across classes.28- `Recall` — range: [0, 1]29 - Ratio of correctly predicted positive activity labels to all actual positive instances. Macro-averaged across classes.30- `F1-Score` — range: [0, 1]31 - Harmonic mean of Precision and Recall. Macro-averaged across classes to balance performance across all activity types.3233## Input / output format3435**Input**: Time-series sensor readings (e.g., accelerometer, gyroscope) corresponding to fixed-length windows or sequences, formatted according to each dataset's standard schema.3637**Output**: Categorical activity label (e.g., 'WALKING', 'SITTING', 'LAYING') representing the ground-truth class for the input sequence.3839## Scoring recipe4041```python42def compute_metrics(y_true, y_pred):43 accuracy = (y_true == y_pred).mean()44 precision = precision_score(y_true, y_pred, average='macro')45 recall = recall_score(y_true, y_pred, average='macro')46 f1 = f1_score(y_true, y_pred, average='macro')47 return {'accuracy': accuracy, 'precision': precision, 'recall': recall, 'f1_score': f1}48```4950## Common pitfalls5152- Fixed train/test splits are used without cross-validation, risking split-dependent variance and over-optimistic results.53- Similar postures (e.g., SITTING vs STANDING) cause high confusion, indicating models may rely on superficial features rather than robust temporal patterns.54- Perfect scores on training data (e.g., PAMAP2) signal severe overfitting, which the authors explicitly note does not guarantee generalization to unseen data.5556## Evidence (verbatim from paper)5758> In this section, we provide the findings from our comparative analysis of the machine learning models used for HAR across the selected benchmark datasets. We thoroughly analyse the performance results, focusing on key metrics such as accuracy, precision, recall, and F1-score, which are critical for determining model success in real-world scenarios.5960## Citation6162```bibtex63@misc{hossain2025benchmarking,64 title={Benchmarking Classical, Deep, and Generative Models for Human Activity Recognition},65 author={Md Meem Hossain et al.},66 year={2025},67 note={arXiv:2501.08471}68}69```7071- arXiv: 2501.08471