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: 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.
  • 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: Hardware and operating-system scheduling vary.
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.

Numbers to remember

50%If adjacent windows overlap by 50%, a new inference starts every second.
18 msIf feature extraction takes 18 ms
12 msinference takes 12 ms

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)

Feature names must include axis, window rule, unit, and calculation version; a bare column named mean cannot be reconstructed later.

  • More frequent sampling captures faster motion but costs sensor and CPU energy.
  • More features may improve separation while increasing memory and inference time.
  • That saves work only if the gate's missed activities are measured.
iotclass.org

Major section

Trace a Walking Window Into Production (continued)

If feature extraction takes 18 ms and inference takes 12 ms, one window needs 30 ms of compute.

  • 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).
  • Deployment changes the data.
  • A desktop benchmark cannot replace the handset result.
iotclass.org

Major section

Trace a Walking Window Into Production (continued)

For activity recognition, a low-cost motion gate can skip full features while the mobile sensing phone is still.

  • 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.
  • Hardware and operating-system scheduling vary.
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.

  • Labels need a timing contract.
  • If a runner presses “stairs” after reaching the top, windows during the climb may be paired with later standing.
  • The application also needs an uncertain state.
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 one supported group falls below its limit, the release decision should name that boundary.
  • When walking and stairs scores are close, forcing the larger score into a confident label can drive poor feedback.
  • Preserve scores or confidence, apply a tested threshold, and decide whether to wait for another window.
iotclass.org

Major section

Trace a Walking Window Into Production (continued)

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

  • 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.

  • Feature names must include axis, window rule, unit, and calculation version; a bare column named mean cannot be reconstructed later.
  • If feature extraction takes 18 ms and inference takes 12 ms, one window needs 30 ms of compute.
  • For activity recognition, a low-cost motion gate can skip full features while the mobile sensing phone is still.
  • The 30 ms example demonstrates the arithmetic; measure the actual feature and inference costs on every supported deployment class.
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?

A100 samples per axis, with a new window starting every 1 second.
B50 samples per axis, with a new window starting every 2 seconds.
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: A 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. A · 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