EMBEDLIX RESEARCH · MACHINE LEARNING LABORATORY SERIES

Results, generalization and critical discussion

Controlled performance alongside continuous-recording failures, external-person shift and research limitations.

Chathuranga Bandara PolkotuwaResearch portfolio · Labs 1–4Chapter 5 of 6

5.1 Main controlled results

ModelValidationSame-person testPrediction unit
KNN93.62% mean grouped CV91.12%One six-feature row
Decision Tree89.55% mean grouped CVNot reportedOne six-feature row
FFN94.76% best validation90.09%One six-feature row
GRU100.00% validation99.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%

KNN91.12%
FFN90.09%
GRU99.19%
Source-derived comparison [1–5]. KNN and FFN use rows; GRU uses correlated windows. Eight test recordings, not thousands of independent trials. Decision Tree test accuracy was not reported.

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.

Accuracy=∑iCii∑i∑jCij,Recalli=Cii∑jCij\mathrm{Accuracy}=\frac{\sum_i C_{ii}}{\sum_i\sum_j C_{ij}},\qquad \mathrm{Recall}_i=\frac{C_{ii}}{\sum_j C_{ij}}

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

GRU · rows actual, columns predicted · percentage within each actual class
Actual / predictedWalkingRunningJumpingForward/backward
Walking96.80%0.00%0.00%3.20%
Running0.00%100.00%0.00%0.00%
Jumping0.00%0.03%99.97%0.00%
Forward/backward0.00%0.00%0.00%100.00%
Calculated only from supplied matrix counts. GRU observations are overlapping windows; KNN/FFN observations are rows. Highlighted cells are correct predictions.

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 sectionWindowsAgreementMean softmax confidence
Walking2,45786.20%0.990
Running2,50589.06%0.995
Jumping2,50678.41%0.951
Forward/backward2,4560.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

Walking86.20%
Running89.06%
Jumping78.41%
Forward/backward0.00%
Final section: 0% agreement despite mean confidence 0.968. Overall estimated agreement 63.62%; no exact transition labels supplied.
Continuous sensor signals, predicted activity and confidence. Original Lab 4 saved figure. Section boundaries are approximate; high confidence is visible during failures.

5.4 External-person tests and distribution shift

ModelControlled own-person testOther-person evaluationExternal protocol
KNN91.12%37.94%48 recordings; 95,441 rows
GRU99.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

Same-person test91.12%
Other person37.94%

GRU

Same-person test99.19%
Other person · approximate25.78%
Separate external protocols: KNN uses 48 labelled recordings; GRU uses a continuous recording with estimated labels and a mismatched fourth activity. This is not a fair external-model ranking.
External GRU confusion matrix. Original Lab 4 output. Approximate labels; external three-position stepping differs from the trained fourth activity.
Gravity-related axis shift across collection setups. Faithful crop of logbook p. 8. Orientation is a proposed explanation, not an isolated measured cause.

5.5 Observations, hypotheses and unresolved causes

Evidence statusFindingAppropriate interpretation
ObservedLarge external accuracy dropStrong controlled performance did not transfer
ObservedExternal GRU predictions dominated by jumpingSystematic closed-class failure, not random small errors
DocumentedFourth activity changed in Lab 4External score has a class-definition mismatch
SuggestedChanged gravity-related axis meansOrientation/placement may contribute
UnconfirmedLoose pocket or independent phone motionA plausible hypothesis, not a recorded collection fact
UnresolvedParticipant, speed, placement and orientation changed togetherNo 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.