mle-interview
  • 面试指南
  • 数据结构与算法
    • 列表
      • 912. Sort an Array
      • 215. Kth Largest Element
      • 977. Squares of a Sorted Array
      • 605. Can Place Flowers
      • 59. Spiral Matrix II
      • 179. Largest Number
      • 31. Next Permutation
    • 二分查找
      • 704. Binary Search
      • 69. Sqrt(x)
      • 278. First Bad Version
      • 34. Find First and Last Position of Element in Sorted Array
      • 33. Search in Rotated Sorted Array
      • 81. Search in Rotated Sorted Array II
      • 162. Find Peak Element
      • 4. Median of Two Sorted Arrays
      • 1095. Find in Mountain Array
      • 240. Search a 2D Matrix II
      • 540. Single Element in a Sorted Array
      • 528. Random Pick with Weight
      • 1300. Sum of Mutated Array Closest to Target
      • 410. Split Array Largest Sum
      • 1044. Longest Duplicate Substring
      • *644. Maximum Average Subarray II
      • *1060. Missing Element in Sorted Array
      • *1062. Longest Repeating Substring
      • *1891. Cutting Ribbons
    • 双指针
      • 26. Remove Duplicate Numbers in Array
      • 283. Move Zeroes
      • 75. Sort Colors
      • 88. Merge Sorted Arrays
      • 167. Two Sum II - Input array is sorted
      • 11. Container With Most Water
      • 42. Trapping Rain Water
      • 15. 3Sum
      • 16. 3Sum Closest
      • 18. 4Sum
      • 454. 4Sum II
      • 409. Longest Palindrome
      • 125. Valid Palindrome
      • 647. Palindromic Substrings
      • 209. Minimum Size Subarray Sum
      • 5. Longest Palindromic Substring
      • 395. Longest Substring with At Least K Repeating Characters
      • 424. Longest Repeating Character Replacement
      • 76. Minimum Window Substring
      • 3. Longest Substring Without Repeating Characters
      • 1004. Max Consecutive Ones III
      • 1658. Minimum Operations to Reduce X to Zero
      • *277. Find the Celebrity
      • *340. Longest Substring with At Most K Distinct Characters
    • 链表
      • 203. Remove Linked List Elements
      • 19. Remove Nth Node From End of List
      • 876. Middle of the Linked List
      • 206. Reverse Linked List
      • 92. Reverse Linked List II
      • 24. Swap Nodes in Pairs
      • 707. Design Linked List
      • 148. Sort List
      • 160. Intersection of Two Linked Lists
      • 141. Linked List Cycle
      • 142. Linked List Cycle II
      • 328. Odd Even Linked List
    • 哈希表
      • 706. Design HashMap
      • 1. Two Sum
      • 146. LRU Cache
      • 128. Longest Consecutive Sequence
      • 73. Set Matrix Zeroes
      • 380. Insert Delete GetRandom O(1)
      • 49. Group Anagrams
      • 350. Intersection of Two Arrays II
      • 299. Bulls and Cows
      • *348. Design Tic-Tac-Toe
    • 字符串
      • 242. Valid Anagram
      • 151. Reverse Words in a String
      • 205. Isomorphic Strings
      • 647. Palindromic Substrings
      • 696. Count Binary Substrings
      • 28. Find the Index of the First Occurrence in a String
      • *186. Reverse Words in a String II
    • 栈与队列
      • 225. Implement Stack using Queues
      • 54. Spiral Matrix
      • 155. Min Stack
      • 232. Implement Queue using Stacks
      • 150. Evaluate Reverse Polish Notation
      • 224. Basic Calculator
      • 20. Valid Parentheses
      • 1472. Design Browser History
      • 1209. Remove All Adjacent Duplicates in String II
      • 1249. Minimum Remove to Make Valid Parentheses
      • *281. Zigzag Iterator
      • *1429. First Unique Number
      • *346. Moving Average from Data Stream
    • 优先队列/堆
      • 692. Top K Frequent Words
      • 347. Top K Frequent Elements
      • 973. K Closest Points
      • 23. Merge K Sorted Lists
      • 264. Ugly Number II
      • 378. Kth Smallest Element in a Sorted Matrix
      • 295. Find Median from Data Stream
      • 767. Reorganize String
      • 1438. Longest Continuous Subarray With Absolute Diff Less Than or Equal to Limit
      • 895. Maximum Frequency Stack
      • 1705. Maximum Number of Eaten Apples
      • *1086. High Five
    • 深度优先DFS
      • 二叉树
      • 543. Diameter of Binary Tree
      • 101. Symmetric Tree
      • 124. Binary Tree Maximum Path Sum
      • 226. Invert Binary Tree
      • 104. Maximum Depth of Binary Tree
      • 951. Flip Equivalent Binary Trees
      • 236. Lowest Common Ancestor of a Binary Tree
      • 987. Vertical Order Traversal of a Binary Tree
      • 572. Subtree of Another Tree
      • 863. All Nodes Distance K in Binary Tree
      • 1110. Delete Nodes And Return Forest
      • 230. Kth Smallest element in a BST
      • 98. Validate Binary Search Tree
      • 235. Lowest Common Ancestor of a Binary Search Tree
      • 669. Trim a Binary Search Tree
      • 700. Search in a Binary Search Tree
      • 108. Convert Sorted Array to Binary Search Tree
      • 450. Delete Node in a BST
      • 938. Range Sum of BST
      • *270. Closest Binary Search Tree Value
      • *333. Largest BST Subtree
      • *285. Inorder Successor in BST
      • *1485. Clone Binary Tree With Random Pointer
      • 回溯
      • 39. Combination Sum
      • 78. Subsets
      • 46. Permutation
      • 77. Combinations
      • 17. Letter Combinations of a Phone Number
      • 51. N-Queens
      • 93. Restore IP Addresses
      • 22. Generate Parentheses
      • 856. Score of Parentheses
      • 301. Remove Invalid Parentheses
      • 37. Sodoku Solver
      • 图DFS
      • 126. Word Ladder II
      • 212. Word Search II
      • 79. Word Search
      • 399. Evaluate Division
      • 1376. Time Needed to Inform All Employees
      • 131. Palindrome Partitioning
      • 491. Non-decreasing Subsequences
      • 698. Partition to K Equal Sum Subsets
      • 526. Beautiful Arrangement
      • 139. Word Break
      • 377. Combination Sum IV
      • 472. Concatenated Words
      • 403. Frog Jump
      • 329. Longest Increasing Path in a Matrix
      • 797. All Paths From Source to Target
      • 695. Max Area of Island
      • 341. Flatten Nested List Iterator
      • 394. Decode String
      • *291. Word Pattern II
      • *694. Number of Distinct Islands
      • *1274. Number of Ships in a Rectangle
      • *1087. Brace Expansion
    • 广度优先BFS
      • 102. Binary Tree Level Order Traversal
      • 103. Binary Tree Zigzag Level Order Traversal
      • 297. Serialize and Deserialize Binary Tree
      • 310. Minimum Height Trees
      • 127. Word Ladder
      • 934. Shortest Bridge
      • 200. Number of Islands
      • 133. Clone Graph
      • 130. Surrounded Regions
      • 752. Open the Lock
      • 815. Bus Routes
      • 1091. Shortest Path in Binary Matrix
      • 542. 01 Matrix
      • 1293. Shortest Path in a Grid with Obstacles Elimination
      • 417. Pacific Atlantic Water Flow
      • 207. Course Schedule
      • 210. Course Schedule II
      • 787. Cheapest Flights Within K Stops
      • 444. Sequence Reconstruction
      • 994. Rotting Oranges
      • 785. Is Graph Bipartite?
      • *366. Find Leaves of Binary Tree
      • *314. Binary Tree Vertical Order Traversal
      • *269. Alien Dictionary
      • *323. Connected Component in Undirected Graph
      • *490. The Maze
    • 动态规划
      • 70. Climbing Stairs
      • 72. Edit Distance
      • 377. Combination Sum IV
      • 1335. Minimum Difficulty of a Job Schedule
      • 97. Interleaving String
      • 472. Concatenated Words
      • 403. Frog Jump
      • 674. Longest Continuous Increasing Subsequence
      • 62. Unique Paths
      • 64. Minimum Path Sum
      • 368. Largest Divisible Subset
      • 300. Longest Increasing Subsequence
      • 354. Russian Doll Envelopes
      • 121. Best Time to Buy and Sell Stock
      • 132. Palindrome Partitioning II
      • 312. Burst Balloons
      • 1143. Longest Common Subsequence
      • 718. Maximum Length of Repeated Subarray
      • 174. Dungeon Game
      • 115. Distinct Subsequences
      • 91. Decode Ways
      • 639. Decode Ways II
      • 712. Minimum ASCII Delete Sum for Two Strings
      • 221. Maximal Square
      • 1277. Count Square Submatrices with All Ones
      • 198. House Robber
      • 213. House Robber II
      • 1235. Maximum Profit in Job Scheduling
      • 740. Delete and Earn
      • 87. Scramble String
      • 1140. Stone Game II
      • 322. Coin Change
      • 518. Coin Change II
      • 1048. Longest String Chain
      • 44. Wildcard Matching
      • 10. Regular Expression Matching
      • 32. Longest Valid Parentheses
      • 1043. Partition Array for Maximum Sum
      • *256. Paint House
      • 926. Flip String to Monotone Increasing
      • *1062. Longest Repeating Substring
      • *1216. Valid Palindrome III
    • 贪心
      • 56. Merge Intervals
      • 621. Task Scheduler
      • 135. Candy
      • 376. Wiggle Subsequence
      • 55. Jump Game
      • 134. Gas Station
      • 1005. Maximize Sum Of Array After K Negations
      • 406. Queue Reconstruction by Height
      • 452. Minimum Number of Arrows to Burst Balloons
      • 738. Monotone Increasing Digits
    • 单调栈
      • 739. Daily Temperatures
      • 503. Next Greater Element II
      • 901. Online Stock Span
      • 85. Maximum Rectangle
      • 84. Largest Rectangle in Histogram
      • 907. Sum of Subarray Minimums
      • 239. Sliding Window Maximum
    • 前缀和
      • 53. Maximum Subarray
      • 523. Continuous Subarray Sum
      • 304. Range Sum Query 2D - Immutable
      • 1423. Maximum Points You Can Obtain from Cards
      • 1031. Maximum Sum of Two Non-Overlapping Subarrays
    • 并查集
      • 684. Redundant Connection
      • 721. Accounts Merge
      • 547. Number of Provinces
      • 737. Sentence Similarity II
      • *305. Number of Islands II
    • 字典树trie
      • 208. Implement Trie
      • 211. Design Add and Search Words Data Structure
      • 1268. Search Suggestions System
      • *1166. Design File System
      • *642. Design Search Autocomplete System
    • 扫描线sweep line
      • 253. Meeting Room II
      • 1094. Car Pooling
      • 218. The Skyline Problem
      • *759. Employee Free Time
    • tree map
      • 729. My Calendar I
      • 981. Time Based Key-Value Store
      • 846. Hand of Straights
      • 480. Sliding Window Median
      • 318. Count of Smaller Numbers After Self
    • 数学类
      • 50. Pow(x, n)
      • *311. Sparse Matrix Multiplication
      • 382. Linked List Random Node
      • 398. Random Pick Index
      • 29. Divide Two Integers
    • 设计类
      • 1603. Design Parking System
      • 355. Design Twitter
      • 1396. Design Underground System
      • *359. Logger Rate Limiter
      • *353. Design Snake Game
      • *379. Design Phone Directory
      • *588. Design In-Memory File System
      • *1244. Design A Leaderboard
    • SQL
  • 机器学习
    • 数学基础
    • 评价指标
    • 线性回归
    • 逻辑回归
    • 树模型
    • 深度学习
    • 支持向量机
    • KNN
    • 无监督学习
    • k-means
    • 强化学习 RL
    • 自然语言处理 NLP
    • 大语言模型 LLM
    • 机器视觉 CV
    • 多模态 MM
    • 分布式机器学习
    • 推荐系统
    • 异常检测与风控
    • 模型解释性
    • 多任务学习
    • MLops
    • 特征工程
    • 在线学习
    • 硬件 cuda/triton
    • 产品case分析
    • 项目deep dive
    • 机器学习代码汇总
  • 系统设计
    • 面向对象设计
      • 电梯设计
      • 停车场设计
      • Unix文件系统设计
    • 系统设计
      • 设计社交网站Twitter
      • 设计视频网站Youtube
      • 短网址系统
      • 爬虫系统
      • 任务调度系统
      • 日志系统
      • 分布式缓存
      • 广告点击聚合系统
      • webhook
    • 机器学习系统设计
      • 推荐系统
      • 搜索引擎
      • Youtube视频推荐
      • Twitter推荐
      • 广告点击预测
      • 新闻推送推荐
      • POI推荐
      • Youtube视频搜索
      • 有害内容检测
      • 大模型RAG
      • 大模型Agent
      • 信贷风控
      • 朋友推荐
      • 去重复性/版权检测
      • 情感分析
      • 目标检测
      • 问答系统
      • 知识图谱问答
  • 行为面试
    • 领导力法则
    • 问答举例
  • 案例分享
    • 准备工作
    • 面试小抄
    • 面试之后
Powered by GitBook
On this page
  • 1. 范围
  • 1.1 纵向-题目类型
  • 1.2 横向-产品线
  • 2. 回答框架Framework
  • 2.1 目标
  • 2.2 metrics
  • 2.3 insight analysis
  • 2.4 实验
  • 3. 案例- Analytical Reasoning: Restaurant Recommendations
  • 参考
  1. 机器学习

产品case分析

对于数据科学家,需要对产品案例分析刷题和总结。

  • 注意framework,按框架回答,而不是想到什么说什么

  • 听清楚考官在问什麽。不要一上来就ab test,quasi-experimentation

  • 提出你有的疑问,质疑每一句考官问你的话,不要他说什麽你都接受

  • 考官问完后,请你跟他说你需要一点时间,统整你的思路跟回答

  • 把自己想成该产品的owner

  • 每一项回答,背后都要有“理由”。为什麽这样,不那样?为什么选这个metric,不是其他?

  • 每一项回答,都想清楚背后的取舍。把 trade-off讲清楚, 是能否拿到senior的关键。Junior pursues right or wrong; Senior looks for trade-offs

1. 范围

结合纵向和横向去做题目分类总结。例如,我们模拟一下FB groups 可以大致问:

  • 我们想要新增某个feature 让用户可以在回文的时候使用表情包,该不该做?

  • 我们想要improve comments per post, 该怎麽做?

  • 我们看到comments per post下降了,该怎麽办

  • 我们想要build a model 让FB groups的贴文出现在个人的newsfeed, 该怎麽做?

1.1 纵向-题目类型

  • Launch or not: 公司想要针对产品某部分优化,开发某种新功能,该不该做?

  • Investigation: 某个产品的表现不如预期,某指标下降,该怎麽调查釐清?

  • How to measure: 如何衡量某个产品的好坏

  • Want to know something: 想要了解某件事情,例如有多少百分比的帐号是假帐号,怎麽知道有人有多个帐号?

  • How to build a model: Meta的某些产品题目是直接涉及到model building, 例如餐厅推荐,侦测假帐号。这种题目较为niche, 但仍要准备。

1.2 横向-产品线

  • 电商 (FB/ IG shop)

  • FB Groups

  • FB Newsfeed

  • FB ads

  • Messenger

2. 回答框架Framework

2.1 目标

以framework来说,第一步,也是最重要的,是订所谓的目标。目标有两种

  • 整个公司有一个大的overall business goal. 例如meta的愿景是让人们之间的距离缩短,并让人们有能力可以打造社群,也帮助企业成长盈利。这不是我发明的,是他们家的mission statement

  • 题目中涉及的产品也会有一个主要目标。例如增加某feature engagement

所有你提出的策略,跟产品的目标,再到公司的大目标,彼此都是环环相扣。 在准备不同公司的时候,都仔细想想这家公司是做什麽的,有哪些产品,然后请你产生出自己对于该公司独家的framework.

FB mission (business goal) → Product goal (pain point solving / why are we doing this) → Hypothesis → Validation (Metrics and methodology i.e experiment design) → Analysis → Decision 先从FB的愿景讲起--> 然后自定义产品的目标为何,这个目标也是要能够帮助到整体企业的目标--> 有哪些假说 → 要如何确定假说,metric and methodology (i.e experiment) → 如何分析结果--> 结果为如何的时候我们怎麽下决策

2.2 metrics

讲metric 的时候,要跟目标有所结合。不要随便乱丢metric Metrics有分成几种

  • Goal (success) metrics: 你想要提升的目标

  • Monitoring metrics

  • Guardrail metrics: 不能看到显着影响的指标

每个metric都有pros and cons. 我认为常见的trade off 有

  • Engagement v.s monetization (有时增加互动,但短期内的收益会减少)

  • Short term v.s long term (有些指标无法反映长期)

  • Engagement v.s safety (互动增加但可能伤害人与人之间的互动,例如耸动的新闻或假新闻)

2.3 insight analysis

提出假设

2.4 实验

请把A/B test的架构讲得清楚:

  • 实验组跟对照组各可以干嘛

  • Randomization unit. 为何选择这个,而不是另一个?最常回答的用user_id 来当作randomization unit,会有什麽pros and cons?

  • 如果A/B test 不可行的时候,该怎麽办?为什麽不可行?

  • 如何 identify network effect? How to mitigate the risk?

3. 案例- Analytical Reasoning: Restaurant Recommendations

FB在考虑build一个餐厅推荐system,插入到user的news feed里面 How would you decide if this might be worth while?

  • 大概就是问opportunity sizing,要pull什么data之类的

How would you design the first iteration of the model?

  • 我回答logistical model 然后input可以用user的activity history,location,他们friends的activity

  • 如果没有这些data,可以先推荐local popular restaurants

How would you validate your model is working?.

  • 我说可以用A/B test然后看how our key metrics change in the two groups

  • 另外可以自己抽样,看看recommendation是不是make sense,我们是不是落了什么factor

What would you do if ads revenue from restaurants increase 5% but engagement down 3%?

  • 我就是说先确定这两个是不是有联系,再segment到不同的region和demographic看有没有specific,如果有specific可以看看是哪里出了问题,是不是有cultural difference,如果是的话可以根据那个design一版custom的

When would you decide the time to ingest into newsfeed?

  • 我说是可以看user有没有固定时间每天用这个app的

  • 另外可以看这个user他如果有很多要看的post,那就先prioritize post;如果他本来每天就能看完,那就可以prioirtize推荐餐厅

前提是Advertiser在fb上买广告,假设target audience size M, purchased N impression

  1. Probability an individual see at lease one impression

  2. Expected value of total people who see at least one impression

  3. We’ve run a prediction model and discovered 25% of our audience is high intent (90% probability of clicks) and 75% are low intent (10% clicks), how many clicks do we expect to see?

  4. If the advertiser are concerned of 0 clicks and want to increase the number of impression they buy. X axis is number of impressions purchased and Y is likelihood of getting 0 clicks, how does X and Y change (draw graph)

参考

  • Ace the data science interview

A/B testing

Previous硬件 cuda/tritonNext项目deep dive

Last updated 21 days ago

Meta Senior DS, Product Analytics 面试准备总结
new grads湾区DA/DS找工作超细致回顾+面经+资料总结
数据科学家面试 Data Scientist Interview Product sense/metrics 套路总结
字节跳动-AI数据分析
Meta DSA 全套过经+Timeline
推荐系统实用分析技巧 - 纳米酱的文章 - 知乎
allocation budget
https://medium.com/stellarpeers
https://www.tryexponent.com/questions?page=1&type=product-design
24年初 DS 跳槽两个月拿到四个 offer 经验总结
product sense解题思路以及数据分析面试资料分享
Udacity AB test
A/B测试(AB实验)的基础、原理、公式推导、Python实现和应用 - 刘启林的文章 - 知乎
bittiger AB test
Lets Python do AB testing analysis
ABTest知识总结 - Steven的文章 - 知乎
冠军/挑战者试验(A/B Test) - 过一点画一条直线的文章 - 知乎
dropbox 加速AB-test: 短期指标建模预测