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.

modelingmobilesensing
Data Dora, the module guide, in a scene from this chapter.
iotclass.org

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.
iotclass.org

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.

Why it matters

Otherwise the activity model can learn mobile sensing phone placement or a recording session instead of motion.

Continuous and adaptive mobile sensing compared across battery, memory, privacy, and accuracy consequences.
Continuous and adaptive mobile sensing compared across battery, memory, privacy, and accuracy consequences.
iotclass.org

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.
iotclass.org

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.
Mobile-sensing activity inference and cost rail.
Mobile-sensing activity inference and cost rail.
iotclass.org

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.
iotclass.org

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.
Adaptive keyword sensing cycles from low-power listening through a speech gate, recognition burst, confidence decision, and duty-cycle update.
Adaptive keyword sensing cycles from low-power listening through a speech gate, recognition burst, confidence decision, and duty-cycle update.
iotclass.org

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.
iotclass.org

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.
iotclass.org

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?

A50 samples per axis, with a new window starting every 2 seconds.
B100 samples per axis, with a new window starting every 1 second.
C100 samples per axis, with a new window starting every 2 seconds.
D200 samples per axis, with a new window starting every 0.5 seconds.
Show answer

Answer: B Window arithmetic is part of the evidence record for latency, compute, and label alignment.

iotclass.org

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?

ABecause unknown should hide difficult classes from users, allowing the release to skip placement, transition, and user-diversity validation.
BBecause placement, missing samples, ambiguous transitions, and user differences can put a window outside the evidence covered by training and validation.
CBecause a low-confidence state lets the application show the nearest known activity while treating unfamiliar placements as minor variations of trained examples.
DBecause windowing becomes unnecessary after training, so low-confidence states can replace fresh windowed sensor evidence.
Show answer

Answer: B An unknown state protects the application when context or data quality falls outside the validated model claim.

iotclass.org

Print reference

Answers

Answer key.

  1. B · Window arithmetic is part of the evidence record for latency, compute, and label alignment.
  2. B · An unknown state protects the application when context or data quality falls outside the validated model claim.
iotclass.org