EMBEDLIX RESEARCH · MACHINE LEARNING LABORATORY SERIES
Results, generalization and critical discussion
Controlled performance alongside continuous-recording failures, external-person shift and research limitations.
5.1 Main controlled results
| Model | Validation | Same-person test | Prediction unit |
|---|---|---|---|
| KNN | 93.62% mean grouped CV | 91.12% | One six-feature row |
| Decision Tree | 89.55% mean grouped CV | Not reported | One six-feature row |
| FFN | 94.76% best validation | 90.09% | One six-feature row |
| GRU | 100.00% validation | 99.19% | One 100-row window |
The validation methods differ: a mean across five grouped folds is not equivalent to one neural-network validation split. The test units differ too. All same-person tests use eight held-out recordings, but the row-based models count 16,042 rows and the GRU counts 15,250 overlapping windows. The comparison is informative, not a perfectly controlled architecture ablation. [1–5]
The source-derived chart below keeps validation and final test separate. No Decision Tree test bar is invented.
Controlled test accuracy · 0–100%
5.2 Reading errors beyond the headline score
Accuracy is the fraction of correct predictions. Recall answers “of all actual examples in this activity, how many were recognized?” Precision asks how often a predicted class is correct. Macro F1 averages class F1 values without letting a large class dominate.
The controlled matrices show that walking is the weakest class across all three tested models. The GRU’s 122 walking errors should be understood as overlapping windows that may share the same short failure region, not necessarily 122 independent failures. Recording-level summaries and contiguous error intervals would provide a more meaningful reliability view.
The matrix below recalculates row percentages directly from supplied counts, using a common walk/run/jump/forward-backward order. The display can switch models and counts/percentages without changing the underlying evidence.
Controlled-test confusion matrices
| Actual / predicted | Walking | Running | Jumping | Forward/backward |
|---|---|---|---|---|
| Walking | 96.80% | 0.00% | 0.00% | 3.20% |
| Running | 0.00% | 100.00% | 0.00% | 0.00% |
| Jumping | 0.00% | 0.03% | 99.97% | 0.00% |
| Forward/backward | 0.00% | 0.00% | 0.00% | 100.00% |
5.3 Continuous activity: a different evaluation challenge
The frozen GRU and scaler were applied to a 100.0-second continuous recording, with a saved sampling estimate of 100.22 Hz and 9,924 windows. The source materials also mention approximately 90 seconds during preparation; the saved notebook duration is used here.
| Estimated activity section | Windows | Agreement | Mean softmax confidence |
|---|---|---|---|
| Walking | 2,457 | 86.20% | 0.990 |
| Running | 2,505 | 89.06% | 0.995 |
| Jumping | 2,506 | 78.41% | 0.951 |
| Forward/backward | 2,456 | 0.00% | 0.968 |
Overall agreement with approximate time-section labels was 63.62%. Exact activity transition annotations were unavailable, so this is approximate section agreement, not rigorously labelled deployment accuracy. Windows near a boundary may contain more than one activity.
The fourth section produced no forward/backward output: 59.24% became running, 27.73% walking and 13.03% jumping. Its mean confidence remained 0.968. This is a concrete example of high confidence accompanying incorrect classification. The original signal, predicted-class and confidence figure below documents that failure rather than concealing it.
Continuous sections · approximate agreement
5.4 External-person tests and distribution shift
| Model | Controlled own-person test | Other-person evaluation | External protocol |
|---|---|---|---|
| KNN | 91.12% | 37.94% | 48 recordings; 95,441 rows |
| GRU | 99.19% | ≈25.78% | One 98.16-second recording; 9,656 windows; approximate labels |
KNN fell by 53.18 percentage points. External walking recall was 0.14% and fourth-class recall 0.05%, while running and jumping transferred better. A mean ay shift from roughly −10 to +9 m/s² suggested phone orientation or placement differences. It did not prove a single causal explanation.
For the GRU, 9,440 of 9,656 external windows (97.76%) were predicted as jumping. The fourth external activity was three-position stepping, not the trained forward/backward movement. Equal-duration sections supplied approximate labels. The rounded endpoints differ by 73.41 points; the supplied report gives a 73.42-point drop using its underlying values/rounding. The endpoints are therefore more defensible than an overprecise subtraction.
The external tests are not matched experiments: they differ in recordings, time labelling and fourth activity. Do not rank KNN as universally more robust than GRU from these two numbers alone. Both failed to demonstrate reliable person-independent activity recognition.
Controlled recognition does not imply transfer
KNN
GRU
5.5 Observations, hypotheses and unresolved causes
| Evidence status | Finding | Appropriate interpretation |
|---|---|---|
| Observed | Large external accuracy drop | Strong controlled performance did not transfer |
| Observed | External GRU predictions dominated by jumping | Systematic closed-class failure, not random small errors |
| Documented | Fourth activity changed in Lab 4 | External score has a class-definition mismatch |
| Suggested | Changed gravity-related axis means | Orientation/placement may contribute |
| Unconfirmed | Loose pocket or independent phone motion | A plausible hypothesis, not a recorded collection fact |
| Unresolved | Participant, speed, placement and orientation changed together | No single cause can be isolated |
StandardScaler cannot remove a rotation of the measurement frame. A GRU cannot infer variation it never saw merely because it remembers time. Four-class softmax always distributes its probability across the known labels; there is no trained “unknown activity” class. More overlapping windows increase prediction frequency, not the number of independent participants or recording conditions.
5.6 Limitations and a defensible follow-up study
The main limitations are one development participant, limited sessions and phone setups, only eight controlled test recordings, repeated inspection of the Lab 2 test, approximate continuous labels, a mismatched external fourth activity, highly correlated windows and no multi-seed uncertainty analysis. Raw CSVs and saved fitted artifacts were not supplied for independent reproduction.
A follow-up should collect balanced data across several participants and sessions, document placement/orientation and mark exact transitions. Hold out whole participants for final evaluation. Compare secure versus loose placement and rotated versus fixed orientation while changing one condition at a time.
Test gravity alignment, sensor magnitudes and rotation augmentation. Compare KNN with window statistics and FFN with the same windows as the GRU. Shuffle time order in a matched ablation to isolate the contribution of sequence order. Use lower overlap, report per-class and recording-level results, repeat seeds, assess confidence calibration, and evaluate unknown-activity rejection.
These are proposed studies, not results already achieved. No power consumption, embedded inference latency, memory budget or on-device deployment was measured in the supplied work.
5.7 Conclusion
A complete progression from smartphone sensor acquisition to classical, feedforward and recurrent classification was demonstrated. The compact GRU was the strongest candidate for the original controlled task, with 99.19% overlapping-window test accuracy and improved walking recognition. Extra recurrent depth and dropout did not improve the tested validation result.
The study’s most important conclusion is the gap between controlled recognition and broader reliability. Continuous activity and a new participant exposed substantial failure, including high-confidence incorrect predictions. The next priority is better data and a stronger evaluation protocol, not simply a larger model.
KNN remains a useful interpretable baseline. The FFN provides a clear lesson about capacity, scaling and validation-to-test gaps. None of these results establishes a ready-to-deploy person-independent system.