回复: 43
跳转到指定楼层
上一主题 下一主题
收起左侧

[面试经验] FB data scientist, analytics 电面

 
全局:

2017(10-12月) 分析|数据科学类 博士 全职@meta - 猎头 - 技术电面  | | Other | 在职跳槽

注册一亩三分地论坛,查看更多干货!

您需要 登录 才可以下载或查看附件。没有帐号?注册账号

x
面试几乎和 一模一样。



1.SQL.鏈?枃鍘熷垱鑷�1point3acres璁哄潧
table: . .и
date | u1 | u2 | n_msg
每行是一对unique user pair之间在某天发的消息数量
您好!
本帖隐藏的内容需要积分高于 188 才可浏览
您当前积分为 0。
使用VIP即刻解锁阅读权限或查看其他获取积分的方式
游客,您好!
本帖隐藏的内容需要积分高于 188 才可浏览
您当前积分为 0。
VIP即刻解锁阅读权限查看其他获取积分的方式
Unlock interview details and practice with AI
Curated Interview Questions from Top Companies
design,答的时候不知道怎么样朝那个方向靠,感觉这个并不涉及A/B testing啊。印度小哥会一直问这个metric具体怎么定义,为什么用这个metric,它变高的是个good sign吗?你觉得还有哪些metric,你提出来的metric1,会影响metric2吗,为什么?

评分

参与人数 1大米 +30 收起 理由
匿名用户-BLX16 + 30 很有用的信息!

查看全部评分


上一篇:Google 新鲜 Data Scientist/Quantitative Analyst面经
下一篇:Akuna Python Dev Data Analysis 电面
全局:
正在准备面试,所以把自己的答案写一下,有错的话请大家一定要指出来啊!多谢!
(2)写个query得到某一天用户发消息朋友数量的distribution,就是output出两列,X: number of unique contacts for each user; Y: number of user with this many contacts。问你觉得这个distribution会长什么样子
  1. select histo.cnt_contact as cnt_contact,
  2.   count(histo.userid) as cnt_users
  3. from
  4. (. 1point 3acres
  5.   select
  6.         tall.u1 as userid,
  7.     count(*) as cnt_contact
  8.   from
  9.   (
  10.     select t1.u1 as u1, t1.u2 as u2
  11.     from contact t1 ..
  12.     union all
  13.     select t2.u2 as u1, t2.u1 as u2
  14.     from contact t2. Χ
  15.   ) tall
  16.   group by tall.u1
  17. ) histo
  18. group by histo.cnt_contact
  19. order by count(histo.userid)
复制代码


3。 SUM(n_msg_with_top_partner)/SUM(all_messages_with_all_contacts),sum over all users. From 1point 3acres bbs
  1. select
  2.         tmax.userid, . ----
  3.         tmax.friendid,
  4.         pct = tmax.n_msg / sum(tmax.n_msg ) over( partition by tmax.userid)
  5. from
  6. (
  7.         select
  8.                 userid = tcnt.userid,
  9.                 friendid = tcnt.freindid,
  10.                 n_msg = tcnt.n_msg,
  11.                 rnk = ROW_NUMBER() over (partition by tcnt.userid order by tcnt.cnt_contact desc)
  12.         from
    . From 1point 3acres bbs
  13.         (
  14.           select
  15.                 tall.u1 as userid,
  16.                 tall.u2 as freindid,
  17.                 tall.n_msg as n_msg.
  18.           from
  19.           (
  20.                 select t1.u1 as u1, t1.u2 as u2, t1.n_msg
  21.                 from contact t1
  22.                 union all
  23.                 select t2.u2 as u1, t2.u1 as u2, t2.n_msg
  24.                 from contact t2
  25.           ) tall. check 1point3acres for more.
  26.         ) tcnt
  27. ) tmax
  28. group by tmax.userid
  29. having tmax.rnk = 1
复制代码

评分

参与人数 1大米 +30 收起 理由
匿名用户-BLX16 + 30 很有用的信息!

查看全部评分

回复

使用道具 举报

推荐
jiangh52 2017-12-31 16:03:05 | 只看该作者
全局:
(非米DA)
1-2, 这种distribution大多数情况都是接近于指数分布的形状吧

2 会根据当期的目标和整体产品战略具体制定。. Χ
但你可以优先用第一问的数据来答啊。
可能的metrics比如说
用来利用网络的密度的(用第一问的数据)
- pair count的各qunatile的时间推移
- new pairs的产生数量的时间推移
用来观测用户利用率的:
- msg_dau / (fb_+msg_dau)
用来观测用户数的:
- msg_uu / goal_uu. 1point3acres
- msg_mau / msg_last_mau
用来观测产品的渗透度的
- 利用时长的各quantile的时间推移
- 有利用的hour数的各quantile的时间推移

评分

参与人数 1大米 +20 收起 理由
匿名用户-BLX16 + 20

查看全部评分

回复

使用道具 举报

全局:
修改后的第3问

  1. drop table contact
  2. create table contact(
  3.         u1 int,. 1point 3 acres
  4.         u2 int,. .и
  5.         n_msg int
  6. )
  7. insert contact (u1, u2, n_msg) values
  8. (1,2, 1), (1,3, 2), (1, 4,6),.google  и
  9. (2,1, 3), (2,3, 2), (2,4, 5),
  10. (3,1, 2), (3,2, 3). ----

  11. -baidu 1point3acres

  12. select userid, friendid, n_msg, sum_msg, pct
  13. from
  14. (
  15.         select
  16.                 tmax.userid, . check 1point3acres for more.
  17.                 tmax.friendid,. check 1point3acres for more.
  18.                 tmax.n_msg,
  19.                 sum_msg = sum(tmax.n_msg ) over( partition by tmax.userid),
  20.                 pct = (tmax.n_msg + 0.0) / sum(tmax.n_msg ) over( partition by tmax.userid),
  21.                 tmax.rnk
  22.         from
  23.         (
  24.                 select
  25.                         userid = tcnt.userid,
  26.                         friendid = tcnt.freindid,
  27.                         n_msg = tcnt.n_msg,
  28.                         rnk = ROW_NUMBER() over (partition by tcnt.userid order by tcnt.n_msg desc)
  29.                 from . .и
  30.                 (
    -baidu 1point3acres
  31.                   select
  32.                         tall.u1 as userid,
  33.                         tall.u2 as freindid,
  34.                         sum(tall.n_msg) as n_msg
  35.                   from
  36.                   (
  37.                         select t1.u1 as u1, t1.u2 as u2, t1.n_msg
  38.                         from contact t1
  39.                         union all
  40.                         select t2.u2 as u1, t2.u1 as u2, t2.n_msg
  41.                         from contact t2 . Waral dи,
  42.                   ) tall
  43.                   group by tall.u1, tall.u2
  44.                 ) tcnt. Waral dи,
  45.         ) tmax
  46. ) tt
  47. where tt.rnk = 1
复制代码


弄下来感觉挺啰嗦的。。。求大神指点
回复

使用道具 举报

🔗
renewu427 2017-11-21 10:34:57 | 只看该作者
全局:
hi,lz 请问下你有几年经验?想看下fb 的ds社招大概要几年经验可以拿到面试。谢谢!
回复

使用道具 举报

🔗
 楼主| onetwo 2017-11-21 13:07:02 | 只看该作者
全局:
renewu427 发表于 2017-11-21 10:34
hi,lz 请问下你有几年经验?想看下fb 的ds社招大概要几年经验可以拿到面试。谢谢!
. check 1point3acres for more.
我一年经验
回复

使用道具 举报

🔗
Alice007 2017-11-22 10:48:23 | 只看该作者
本楼:
全局:
select

补充内容 (2017-11-22 12:18):
不好意思发错了
回复

使用道具 举报

🔗
Alice007 2017-11-22 12:18:23 | 只看该作者
全局:
刚才手抖给发错了,lz看一下我这个query写的对不?Select num_contact, count(*) as freq from( Select id, sum(ct) as num_contact from( Select u1 as id, count(distinct u2) as ct from table group by 1 Union all Select u2 as id, count(distinct u1) as ct from table group by 1) inq Group by 1) inq_0 Group by 1 Order by 1
回复

使用道具 举报

全局:
Alice007 发表于 2017-11-22 12:18
刚才手抖给发错了,lz看一下我这个query写的对不?Select num_contact, count(*) as freq from( Select id, ...
-baidu 1point3acres
感觉也许不需要最里面嵌套的union all, 因为另一个帖子里说过,unique user a, user b, 如果a给b发消息,只会出现一次,所以不需要vertical join吧。

补充内容 (2017-11-22 21:44):
我错了,,,仔细想了一下,确实需要union all.....

补充内容 (2017-11-22 21:44):
我错了,,,仔细想了一下,确实需要union all.....

补充内容 (2017-11-22 21:44):
我错了。。又想了一下,确实需要union all
回复

使用道具 举报

🔗
Alice007 2017-11-23 00:49:32 | 只看该作者
全局:
April_tzy 发表于 2017-11-22 21:41
感觉也许不需要最里面嵌套的union all, 因为另一个帖子里说过,unique user a, user b, 如果a给b发消息, ...

嗯,fb面试就那么几个题目,然后不同变种,感觉了解好数据以及之间的逻辑是关键!另外地里的回帖功能需要提高啊,自己连改贴都不行
回复

使用道具 举报

🔗
Alice007 2017-11-23 00:54:05 | 只看该作者
全局:
第三个sql题目:
请lz/层主们帮忙看看对不对哈

Select sum(case when rk = 1 then n_msg else 0 end)/(select sum(n_msg) from table)-baidu 1point3acres
from
Select rank() over(partition by u1 order by n_msg desc) as rk,
n_msg
from(. 1point 3 acres
Select * from table
. Waral dи,Union
Select u2 as u1, u1 as u2, n_msg
From table) inq

评分

参与人数 1大米 +10 收起 理由
匿名用户-BLX16 + 10 给你点个赞!

查看全部评分

回复

使用道具 举报

全局:
Alice007 发表于 2017-11-23 00:49
嗯,fb面试就那么几个题目,然后不同变种,感觉了解好数据以及之间的逻辑是关键!另外地里的回帖功能需要 ...

是的。。。而且我第一次第二次补充,说系统错误。我就发了第三次,结果一刷新,三次都在。。。。无语了。哈哈。
回复

使用道具 举报

🔗
amour0_0 2017-12-1 08:44:18 | 只看该作者
全局:
谢谢楼主,今天店面就是这个题目, 一模一样
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册账号
隐私提醒:
  • ☑ 禁止发布广告,拉群,贴个人联系方式:找人请去🔗同学同事飞友,拉群请去🔗拉群结伴,广告请去🔗跳蚤市场,和 🔗租房广告|找室友
  • ☑ 论坛内容在发帖 30 分钟内可以编辑,过后则不能删帖。为防止被骚扰甚至人肉,不要公开留微信等联系方式,如有需求请以论坛私信方式发送。
  • ☑ 干货版块可免费使用 🔗超级匿名:面经(美国面经、中国面经、数科面经、PM面经),抖包袱(美国、中国)和录取汇报、定位选校版
  • ☑ 查阅全站 🔗各种匿名方法

本版积分规则

>
快速回复 返回顶部 返回列表