PracHub
QuestionsLearningGuidesInterview Prep
|Home/Machine Learning/Bytedance

Choose Ranking Functions, Customer Value Metrics, and Predictive Models

Last updated: Aug 7, 2026

Quick Overview

A machine-learning and analytics fundamentals interview covering SQL ranking functions, defensible high-value-customer definitions, and model selection across linear, logistic, random-forest, and gradient-boosted approaches.

  • medium
  • Bytedance
  • Machine Learning
  • Data Scientist

Choose Ranking Functions, Customer Value Metrics, and Predictive Models

Company: Bytedance

Role: Data Scientist

Category: Machine Learning

Difficulty: medium

Interview Round: Technical Screen

# Choose Ranking Functions, Customer Value Metrics, and Predictive Models A global e-commerce team asks three connected fundamentals: distinguish SQL ranking functions, define a high-value customer for a business decision, and compare linear regression, logistic regression, random forests, and gradient-boosted trees. ### Constraints & Assumptions - Ranking examples can contain ties and require deterministic output. - A high-value definition must specify horizon, margin or revenue, retention, and refunds. - Model choice depends on whether the target is continuous or binary. - Historical customer behavior can leak future information if features use the outcome window. ### Clarifying Questions to Ask - Should tied rows share a rank, and may ranks contain gaps? - What action will the high-value segment trigger? - Is interpretability, probability calibration, or raw predictive accuracy the main model requirement? ### Part 1 — Ranking functions Explain ROW_NUMBER, RANK, and DENSE_RANK with a tied example and state the extra ordering needed for deterministic ROW_NUMBER. #### What This Part Should Cover - Tie behavior and rank gaps - Partition and order definitions - A unique tie-break for deterministic selection ### Part 2 — High-value customers Define a label or score that reflects durable economic value rather than recent order count alone. #### What This Part Should Cover - Contribution margin, horizon, and refund treatment - New-versus-existing customer comparability - A validation plan tied to the downstream action ### Part 3 — Model families Compare linear and logistic regression with random forests and gradient boosting, then propose a leakage-safe evaluation. #### What This Part Should Cover - Target and loss compatibility - Linearity, interactions, calibration, and regularization - Temporal split and actionable metrics ### What a Strong Answer Covers - Definitions with examples - Economic and statistical alignment - Leakage and calibration controls ```hint Start from the downstream decision Ranking semantics, customer value, and model evaluation all change when the output is used for one winner, a tiered list, a budget-limited campaign, or an estimated probability. ``` ### Follow-up Questions - How would you evaluate value among customers too new for a long horizon? - When is DENSE_RANK preferable to RANK?

Quick Answer: A machine-learning and analytics fundamentals interview covering SQL ranking functions, defensible high-value-customer definitions, and model selection across linear, logistic, random-forest, and gradient-boosted approaches.

Related Interview Questions

  • Explain XGBoost's Overfitting Resistance - Bytedance (medium)
  • Analyze Product Launch and Creator Engagement - Bytedance (medium)
  • Explain train-test generalization gap - Bytedance (easy)
  • Explain Train-Test Performance Gap - Bytedance (easy)
|Home/Machine Learning/Bytedance

Choose Ranking Functions, Customer Value Metrics, and Predictive Models

Bytedance logo
Bytedance
Aug 3, 2026, 12:00 AM
mediumData ScientistTechnical ScreenMachine Learning
0
0

Choose Ranking Functions, Customer Value Metrics, and Predictive Models

A global e-commerce team asks three connected fundamentals: distinguish SQL ranking functions, define a high-value customer for a business decision, and compare linear regression, logistic regression, random forests, and gradient-boosted trees.

Constraints & Assumptions

  • Ranking examples can contain ties and require deterministic output.
  • A high-value definition must specify horizon, margin or revenue, retention, and refunds.
  • Model choice depends on whether the target is continuous or binary.
  • Historical customer behavior can leak future information if features use the outcome window.

Clarifying Questions to Ask Guidance

  • Should tied rows share a rank, and may ranks contain gaps?
  • What action will the high-value segment trigger?
  • Is interpretability, probability calibration, or raw predictive accuracy the main model requirement?

Part 1 — Ranking functions

Explain ROW_NUMBER, RANK, and DENSE_RANK with a tied example and state the extra ordering needed for deterministic ROW_NUMBER.

What This Part Should Cover Guidance

  • Tie behavior and rank gaps
  • Partition and order definitions
  • A unique tie-break for deterministic selection

Part 2 — High-value customers

Define a label or score that reflects durable economic value rather than recent order count alone.

What This Part Should Cover Guidance

  • Contribution margin, horizon, and refund treatment
  • New-versus-existing customer comparability
  • A validation plan tied to the downstream action

Part 3 — Model families

Compare linear and logistic regression with random forests and gradient boosting, then propose a leakage-safe evaluation.

What This Part Should Cover Guidance

  • Target and loss compatibility
  • Linearity, interactions, calibration, and regularization
  • Temporal split and actionable metrics

What a Strong Answer Covers Guidance

  • Definitions with examples
  • Economic and statistical alignment
  • Leakage and calibration controls

Follow-up Questions Guidance

  • How would you evaluate value among customers too new for a long horizon?
  • When is DENSE_RANK preferable to RANK?
Loading comments...

Browse More Questions

More Machine Learning•More Bytedance•More Data Scientist•Bytedance Data Scientist•Bytedance 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.