rockerritesh/accelerometerData
Hand Detection Training Data This folder contains sensor data collected from mobile devices for training the hand detection model. Overview The dataset includes accelerometer and gyroscope readings from 2 subjects, each holding a device with both their left and right hands. This data is used to train the Random Forest classifier that achieves 94.6% accuracy in detecting which hand is holding the device. Directory Structure hand_data/ ├──… See the full description on the dataset page: https://huggingface.co/datasets/rockerritesh/accelerometerData.
17
1---2license: mit3task_categories:4- feature-extraction5language:6- en7tags:8- sensor9- physics10---11 12 13# Hand Detection Training Data14 15This folder contains sensor data collected from mobile devices for training the hand detection model.16 17## Overview18 19The dataset includes accelerometer and gyroscope readings from 2 subjects, each holding a device with both their left and right hands. This data is used to train the Random Forest classifier that achieves 94.6% accuracy in detecting which hand is holding the device.20 21## Directory Structure22 23```24hand_data/25├── accelerometer/ # Accelerometer sensor data (primary)26│ ├── s-1_left_hand.csv # Subject 1, left hand (39,102 samples)27│ ├── s-1_right_hand.csv # Subject 1, right hand (30,528 samples)28│ ├── s-2_left_hand.csv # Subject 2, left hand (44,724 samples)29│ └── s-2_right_hand.csv # Subject 2, right hand (35,408 samples)30│31└── gyrocop/ # Gyroscope data (supplementary)32 ├── s-1_left_hand.csv # Subject 1, left hand33 └── s-1_right_hand.csv # Subject 1, right hand34```35 36## Data Format37 38### Accelerometer Data39 40Each CSV file contains timestamped 3-axis accelerometer readings:41 42| Column | Type | Description |43|-----------|-----------|------------------------------------------|44| timestamp | datetime | ISO 8601 format (e.g., 2025-12-27T09:13:07.598506) |45| x | float | X-axis acceleration (m/s²) |46| y | float | Y-axis acceleration (m/s²) |47| z | float | Z-axis acceleration (m/s²) |48 49**Example:**50```csv51timestamp,x,y,z522025-12-27T09:13:07.598506,0.849452,3.895515,8.087741532025-12-27T09:13:08.083118,0.727418,4.000800,8.09970554```55 56### Gyroscope Data57 58Similar structure with angular velocity measurements (°/s).59 60## Dataset Statistics61 62### Total Samples63- **Subject 1 (Left)**: 39,102 samples64- **Subject 1 (Right)**: 30,528 samples65- **Subject 2 (Left)**: 44,724 samples66- **Subject 2 (Right)**: 35,408 samples67- **Total**: 149,762 samples68 69### Collection Method70- Device: Mobile phone with accelerometer sensor71- Sampling rate: ~50-100 Hz (varies)72- Duration: Multiple sessions per subject/hand73- Environment: Normal daily usage patterns74 75## Data Characteristics76 77### X-Axis (Left/Right Tilt)78- **Primary discriminator** for hand detection79- Left hand: Positive values (device tilts right)80- Right hand: Negative values (device tilts left)81- Statistical significance: p < 0.00000182 83### Y-Axis (Forward/Backward Tilt)84- Secondary feature85- Shows hand-specific patterns86- Less discriminative than X-axis87 88### Z-Axis (Vertical)89- Represents gravity component90- Generally around 9.8 m/s² when stationary91- Varies with device orientation92 93### Magnitude94- Calculated: √(x² + y² + z²)95- Overall movement intensity96- Helps distinguish activity levels97 98## Usage in Training99 100This data is used in [../which_hand_you_use.ipynb](https://github.com/rockerritesh/sensor/blob/main/hand/which_hand_you_use.ipynb) for:101 1021. **Exploratory Data Analysis (EDA)**103 - Distribution analysis104 - Statistical testing105 - Correlation analysis106 - Time series visualization107 1082. **Feature Engineering**109 - Calculate magnitude110 - Window-based statistics (mean, std, min, max)111 - Temporal features (deltas, trends)112 1133. **Model Training**114 - Single-point Random Forest (94.6% accuracy)115 - Windowed Random Forest (96%+ accuracy)116 - PCA for visualization117 118## File Sizes119 120- `s-1_left_hand.csv`: ~2.1 MB121- `s-1_right_hand.csv`: ~1.7 MB122- `s-2_left_hand.csv`: ~2.4 MB123- `s-2_right_hand.csv`: ~2.0 MB124 125**Total**: ~8.2 MB (accelerometer only)126 127## Data Quality128 129### Completeness130✅ No missing values131✅ Continuous timestamps132✅ Consistent format across all files133 134### Statistical Validation135✅ Normal distribution per axis136✅ Significant hand differences (p < 0.05)137✅ Consistent patterns across subjects138 139## Privacy & Ethics140 141- Data collected with informed consent142- No personally identifiable information143- Used solely for research purposes144- Anonymized subject identifiers (S1, S2)145 146## Collection Guidelines147 148If collecting additional data:149 1501. **Consistency**: Use same device/settings1512. **Duration**: Minimum 5-10 minutes per hand1523. **Activity**: Natural usage (browsing, typing, etc.)1534. **Labeling**: Clear hand identification1545. **Format**: Match existing CSV structure155 156## Notes157 158- This data is **excluded from git** (see `.gitignore`)159- Keep data locally or use Git LFS for large files160- Model files are generated from this data161- Data collection scripts in `shared/` folder162 163## Related Files164 165- **Training**: [../which_hand_you_use.ipynb](https://github.com/rockerritesh/sensor/blob/main/hand/which_hand_you_use.ipynb)166- **Models**: `hand_classifier_*.pkl` files167- **Collection**: `collect_data.py` in shared folder168 169---170 171**Last Updated**: December 2025172**Format Version**: 1.0173**Total Samples**: 149,762174 