Analytics & ML · Study deck
Mobile Sensing: Features and Deployment
A runner's mobile sensing phone turns accelerometer samples into an activity label while its battery, processor, and radio are all constrained.
Data Dora is your guide for this deck.

After studying this chapter
Learning objectives
You will be able to:
- Explain: A two-second window contains (50\ \mathrm{samples/s}\times2\ \mathrm{s}=100) samples per axis, or 300 scalar values across x, y, and z.
- Explain: Starting one inference each second gives a 3% compute-time duty fraction before operating-system overhead: (30\ \mathrm{ms}/1{,}000\ \mathrm{ms}=0.03).
- Explain: Feature names must include axis, window rule, unit, and calculation version; a bare column named mean cannot be reconstructed later.
- Explain: It catches a column reorder, stale activity model, or label mapping error that isolated feature and inference tests can miss.
Major section
Trace a Walking Window Into Production
A two-second window contains (50\ \mathrm{samples/s}\times2\ \mathrm{s}=100) samples per axis, or 300 scalar values across x, y, and z.
- If adjacent windows overlap by 50%, a new inference starts every second.
- The mean can reflect mobile sensing phone orientation, while variation and dominant frequency can describe repeated steps.
- Feature names must include axis, window rule, unit, and calculation version; a bare column named mean cannot be reconstructed later.
- A desktop benchmark cannot replace the handset result.
Major section
Trace a Walking Window Into Production (continued)
More frequent sampling captures faster motion but costs sensor and CPU energy.
- More features may improve separation while increasing memory and inference time.
- If feature extraction takes 18 ms and inference takes 12 ms, one window needs 30 ms of compute.
- That saves work only if the gate's missed activities are measured.
Major section
Trace a Walking Window Into Production (continued)
Starting one inference each second gives a 3% compute-time duty fraction before operating-system overhead: (30\ \mathrm{ms}/1{,}000\ \mathrm{ms}=0.03).
- For activity recognition, a low-cost motion gate can skip full features while the mobile sensing phone is still.
- Deployment changes the data.
- Hardware and operating-system scheduling vary.
Major section
Trace a Walking Window Into Production (continued)
The 30 ms example demonstrates the arithmetic; measure the actual feature and inference costs on every supported deployment class.
- A training set collected with phones in trouser pockets may fail when users carry them in bags.
- Different sensor ranges, operating-system filters, and clock behavior can shift features.
- Labels need a timing contract.
Major section
Trace a Walking Window Into Production (continued)
The loop in Figure: Adaptive keyword sensing cycles from low-power listening through shows a related deployment pattern: sense, make a cheap first decision, wake a richer stage when needed, and use observed outcomes to tune the trigger.
- If a runner presses “stairs” after reaching the top, windows during the climb may be paired with later standing.
- If one supported group falls below its limit, the release decision should name that boundary.
- The application also needs an uncertain state.
- When walking and stairs scores are close, forcing the larger score into a confident label can drive poor feedback.
Major section
Trace a Walking Window Into Production (continued)
Preserve scores or confidence, apply a tested threshold, and decide whether to wait for another window.
- A single mobile sensing phone percentage is weak; use longer runs, repeated trials, or a suitable power instrument.
- Retain the raw trace and calculation so the resource claim can be checked after an operating-system update.
- It catches a column reorder, stale activity model, or label mapping error that isolated feature and inference tests can miss.
Deck summary
Key takeaways
A two-second window contains (50\ \mathrm{samples/s}\times2\ \mathrm{s}=100) samples per axis, or 300 scalar values across x, y, and z.
- More frequent sampling captures faster motion but costs sensor and CPU energy.
- Starting one inference each second gives a 3% compute-time duty fraction before operating-system overhead: (30\ \mathrm{ms}/1{,}000\ \mathrm{ms}=0.03).
- The 30 ms example demonstrates the arithmetic; measure the actual feature and inference costs on every supported deployment class.
- Preserve scores or confidence, apply a tested threshold, and decide whether to wait for another window.
Retrieval practice
Recall check 1 of 2

Data Dora says: answer from memory, then check your reasoning.
Q1A phone samples accelerometer data at 50 Hz using 2-second windows with 50 percent overlap. How many samples are in each axis window, and how often does a new window start?
Show answer
Answer: B Window arithmetic is part of the evidence record for latency, compute, and label alignment.
Retrieval practice
Recall check 2 of 2

Data Dora says: answer from memory, then check your reasoning.
Q2Why should a deployed mobile activity recognizer include an unknown or low-confidence state?
Show answer
Answer: B An unknown state protects the application when context or data quality falls outside the validated model claim.
Print reference
Answers
Answer key.
- B · Window arithmetic is part of the evidence record for latency, compute, and label alignment.
- B · An unknown state protects the application when context or data quality falls outside the validated model claim.