Build Trend and Ratio Features From Google Cloud Usage Logs
Last updated: November 29, 2026
Quick Overview
You are predicting which Google Cloud billing accounts will significantly reduce spend next quarter. Given daily usage per product, design features that capture trends, ratios, and volatility rather than just raw totals.
0
0
0 solved
You are predicting which Google Cloud billing accounts will significantly reduce spend next quarter. Given daily usage per product, design features that capture trends, ratios, and volatility rather than just raw totals.
Cloud account teams use spend-risk models to prioritize outreach, and accounts vary by orders of magnitude in size. The interviewer wants to see whether you can engineer scale-free features that describe how usage is changing, and keep them robust to noise and seasonality.
What the Interviewer Expects
- Explains why raw totals mostly encode account size
- Builds ratio features across windows (recent versus baseline)
- Builds slope or growth-rate features with robustness to noise
- Adds mix and concentration features across products
- Handles new accounts, zeros, and seasonality
Key Topics to Cover
How to Approach This
- Understand the bias-variance trade-off. High training accuracy but low test accuracy signals overfitting.
- Choose evaluation metrics carefully based on the problem. Accuracy alone is often insufficient.
- Feature engineering is often more impactful than model selection.
- Know when to use tree-based models (tabular data) vs neural networks (unstructured data).
- Handle class imbalance with SMOTE, class weights, or appropriate loss functions.
Possible Follow-up Questions
- How would you handle an account whose usage drops to zero because of a planned migration between projects?
- Which features would you show the account manager as reasons?
- How do you avoid the model just learning end-of-quarter billing patterns?
Sharpen Your Skills on Codemia
Practice similar problems with our interactive workspace, get AI feedback, and track your progress.
Explore ML Interview PrepSample Answer
Clarify
Ask the definition of the label (for example, next quarter spend below 70 percent of this quarter), what granularity of data exists (daily per SKU and project), how long accounts have been active, and...
Approach
Raw totals mostly tell the model how big an account is, which is weakly related to whether it will shrink. Better features describe change and structure, and are scale-free so a $1,000 per month start...