PracHub
QuestionsLearningGuidesInterview Prep
|Home/Machine Learning/Google

Engineer Features to Enhance Smartphone Battery Life Prediction

Last updated: Jul 15, 2026

Quick Overview

Evaluates battery-life prediction from sparse discharge traces using interpolation and feature engineering. Strong answers implement single- and multi-trace prediction, add contextual features, and match similar devices when history is sparse.

  • medium
  • Google
  • Machine Learning
  • Data Scientist

Engineer Features to Enhance Smartphone Battery Life Prediction

Company: Google

Role: Data Scientist

Category: Machine Learning

Difficulty: medium

Interview Round: Technical Screen

##### Scenario Predict how long a smartphone can keep working given its current battery level, when limited historical data is available. ##### Question Write code that uses linear interpolation to predict remaining usage time from current battery percentage. Beyond battery level, which additional variables would you engineer to improve prediction accuracy and why? If no historical data from identical phones exists, describe a feature-matching strategy to generate a usable training set. ##### Hints Think temperature, screen-on time, app mix, battery health; consider similarity search on handset specs.

Quick Answer: Evaluates battery-life prediction from sparse discharge traces using interpolation and feature engineering. Strong answers implement single- and multi-trace prediction, add contextual features, and match similar devices when history is sparse.

Related Interview Questions

  • LLM Foundations: Architecture, Adaptation, and Steering - Google (easy)
  • Explain ranking cold-start strategies - Google (medium)
  • Explain LLM fine-tuning and generative models - Google (medium)
  • Compare NLP tokenization and LLM recommendations - Google (medium)
  • Explain LLM lifecycle and trade-offs - Google (medium)
|Home/Machine Learning/Google

Engineer Features to Enhance Smartphone Battery Life Prediction

Google logo
Google
Jul 12, 2025, 6:59 PM
mediumData ScientistTechnical ScreenMachine Learning
104
0

Battery Life Prediction with Sparse History

You are given sparse discharge traces that record battery percentage over elapsed time for prior usage sessions. Predict the remaining usage time for a phone at its current battery percentage using linear interpolation, then propose ways to improve prediction accuracy.

Constraints & Assumptions

  • Each trace is a time-ordered series of elapsed time and battery percentage during continuous usage.
  • Battery percentage should generally decrease over time, though minor measurement noise may exist.
  • The current battery percentage may fall between observed trace points or outside the observed range.
  • Predictions should handle sparse history and missing identical-device data gracefully.

Clarifying Questions to Ask Guidance

  • What units are used for elapsed time, and how often are battery readings sampled?
  • Are traces from the same user, same device model, same battery age, or mixed devices?
  • Is the phone currently charging or in continuous discharge?
  • What error metric matters most: MAE, MAPE, calibration, or conservative underprediction?

Part 1 - Interpolation Predictor

Provide code or pseudocode for a linear interpolation predictor for a single trace and a multi-trace aggregation.

What This Part Should Cover Guidance

  • Sort and validate trace points, handle monotonicity issues, and find bracketing percentages.
  • Interpolate elapsed time at the current percentage and estimate time to zero.
  • Handle extrapolation, out-of-range percentages, and sparse endpoints carefully.
  • Aggregate multiple traces using mean, median, weighted average, or nearest-context traces.

Part 2 - Feature Engineering

Propose additional variables to improve battery-life prediction and explain why they help.

What This Part Should Cover Guidance

  • Include device model, battery health, battery age, OS version, screen brightness, network type, app mix, CPU/GPU load, temperature, charging history, and usage intensity.
  • Include contextual features such as time of day, location state, foreground app category, and connectivity.
  • Discuss per-user and per-device personalization.
  • Mention leakage risks from features unavailable at prediction time.

Part 3 - Matching Without Identical Historical Data

If no historical data from identical phones exists, describe a feature-matching strategy to build a usable training set.

What This Part Should Cover Guidance

  • Match on device family, battery capacity, OS, battery health, usage context, network, temperature, and app behavior.
  • Use nearest-neighbor matching, clustering, hierarchical models, or transfer learning.
  • Weight traces by similarity and recency.
  • Validate on held-out traces and report uncertainty for sparse matches.

Follow-up Questions Guidance

  • How would you handle a trace where battery percentage briefly increases?
  • How would you evaluate prediction quality for very low battery percentages?
  • How would the approach change if the phone has only one partial trace?
Loading comments...

Browse More Questions

More Machine Learning•More Google•More Data Scientist•Google Data Scientist•Google Machine Learning•Data Scientist Machine Learning

Write your answer

Your first approved answer each day earns 20 XP.

Sign in to write your answer.
PracHub

Master your tech interviews with 9,000+ real questions from top companies.

Product

  • Questions
  • Learning Tracks
  • Interview Guides
  • Resources
  • Premium
  • For Universities

Browse

  • By Company
  • By Role
  • By Category
  • Topic Hubs
  • SQL Questions
  • AI Coding Questions
  • Compare Platforms
  • Discord Community

Support

  • support@prachub.com
  • (916) 541-4762

Legal

  • Privacy Policy
  • Terms of Service
  • About Us

© 2026 PracHub. All rights reserved.