楼主: 牧moon
跳转到指定楼层
上一主题 下一主题
收起左侧

DS跳槽准备+打卡

 
🔗
 楼主| 牧moon 2019-1-16 16:39:24 | 只看该作者
全局:
01/15/19 第八天
今天简单的复习了Bayes optimal classifier,maximum likehood estimate,naive bayes classifier
1. Bayes optimal classifier是根据Bayesian decision theory推导出的最优分类器,为classifier的精度提供了一个上限。但是真正问题中很难求得,因为需要posterior probability P(c|x)。这就是我们平时用各种经典算法求得的概率,有了它还求啥啊。。。
2. P(c|x)有两种求法;discriminant model, 诸如tree, SVM, NN; generative model, based on Bayes theory, compute P(x|c)
3. MLE is a method to estimate the parameters given samples. 比如,find w to maximize the product of P(x|c) over all x given a c
4. The challenge to compute P(x|c) is that x is multi-dimensional. Naive Bayes makes a very strong assumption that any feature of x is independent. Thus, P(x|c) = product of P(xi | c), where xi is the its feature in x. . From 1point 3acres bbs
5. For Naive Bayes, the training stage is to compute each probability of one feature given a class, P(xi | c) or P(xi | -c); the inference part is just to find the corresponding probability for a test data point with x_test, compute both P(c | x_test) and P(-c | x_test) and choose the bigger one.
回复

使用道具 举报

🔗
sunday2018 2019-1-17 01:26:25 | 只看该作者
全局:
牧moon 发表于 2019-1-7 17:44
01/06/19 第二天
本来开始想整理一下如何处理imbalanced dataset
1. 选择合适的metric,precision/recall ...

楼主,可以和你讨论一下rf的missing value这里吗.x先naive filling之后,再计算proximity,但是为什么要做了forest run之后再算proximity呢,是需要用到forest run的结果吗?然后filling了一个比较好的missing value之后就又要在run forest train data,是这样吗
回复

使用道具 举报

🔗
jjyy0610 2019-1-17 06:45:08 | 只看该作者
全局:
不管怎么样,都要build自己的domain knowledge
回复

使用道具 举报

🔗
 楼主| 牧moon 2019-1-17 09:07:04 | 只看该作者
全局:
sunday2018 发表于 2019-1-17 01:26
楼主,可以和你讨论一下rf的missing value这里吗.x先naive filling之后,再计算proximity,但是为什么要 ...

我跟你理解的一样。RF作者的建议,建立了forest后可以计算proximity,看proximity的定义
“These are one of the most useful tools in random forests. The proximities originally formed a NxN matrix. After a tree is grown, put all of the data, both training and oob, down the tree. If cases k and n are in the same terminal node increase their proximity by one. At the end, normalize the proximities by dividing by the number of trees.”
出处在这里https://www.stat.berkeley.edu/~b ... c_home.htm#missing1

我个人感觉,跟k-means的converge的过程有些像。直观理解就是,即使缺失了数据,可以靠着其他feature计算出数据点间的近似度,然后估计缺失值。. Χ
. From 1point 3acres bbs
我自己没有真正用这个方法做过数据分析,所以并不知道实际用途是不是实用。不过面试中可以顺着这个思路回答缺失值的问题。希望有帮助。
回复

使用道具 举报

🔗
 楼主| 牧moon 2019-1-17 09:09:36 | 只看该作者
全局:
jjyy0610 发表于 2019-1-17 06:45
不管怎么样,都要build自己的domain knowledge

很同意,我觉得数理背景好的domain expert自己都可以做ds,如果有时间的话。。。
回复

使用道具 举报

🔗
sunday2018 2019-1-17 13:53:29 | 只看该作者
全局:
牧moon 发表于 2019-1-17 09:07
我跟你理解的一样。RF作者的建议,建立了forest后可以计算proximity,看proximity的定义
“These are on ...

谢谢你的详细解答哈,感觉好像是挺有用的,有种先很roughly build trees再adaptively的修正的感觉~
回复

使用道具 举报

🔗
 楼主| 牧moon 2019-1-17 16:51:49 | 只看该作者
全局:
01/16/19 第九天
最近这一周工作稍微有些忙,下班后整块看书时间少了。所以决定练习写SQL,一直没有加强,是自己薄弱的环节。
做了几个用window function的题,加深了理解。. Χ
Avg() OVER(), rank() OVER(ORDER BY xxx),rank应该是一定要有ORDER BY的。
OVER() defines a window with PARTITION BY. Inside the window, the function before OVER() moves OVER each row (maybe that's why called window function, and use OVER as a keyword). ORDER BY defines the window frame used by the function with respect to the current row.
复习了where and having 的区别
回复

使用道具 举报

🔗
chztony 2019-1-17 21:38:09 | 只看该作者
全局:
楼主需要刷Leetcode吗?
回复

使用道具 举报

🔗
warm_chill 2019-1-18 03:31:16 | 只看该作者
全局:
Hi 楼主好! ..
请问楼主有定专门的区块复习计划系统的复习吗?还想问问楼主SQL复习的资源~
回复

使用道具 举报

🔗
hjsdssz 2019-1-18 13:04:12 | 只看该作者
全局:
感谢LZ分享 一起进步 祝早日梦想成真
回复

使用道具 举报

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

本版积分规则

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