注册一亩三分地论坛,查看更多干货!
您需要 登录 才可以下载或查看附件。没有帐号?注册账号 
x
近一两年数据科学成了热门,光Data Scientist这个title就显得极为高大上。楼主作为EE生,还没毕业之际就做过一些数据方向的项目,发过几篇论文,一梦想加入这个高端的组织。虽然现在工作还不理想,楼主希望把自己这两年一些准备记录分享出来,换些大米,攒点人品。
楼主面试过一些大小公司,总体感觉是数据科学面试规律性没有软工强,面试套路一般是:做题+知识问答+统计计算+设计。
1. coding做题:这部分一般占到面试50%以上,形式跟面试软工一样,面试官多半也是软工,但是问题一般来说会稍微简单一点,leetcode medium难度,但是运气不遇到烙印面试官的时候题也会很难。楼主遇到一些比较难的题,涉及二维dp的,backtracking的,不准备的话一点都做不上来。有的公司比较侧重做题,比如5轮面试4轮做题,一轮知识。有的比较侧重知识,但是也免不了做题,尤其电面大多也是做题为主。基本leetcode刷到300题才能有点信心。
2. 知识考察:这个部分变化最大,有的面试官会针对一些名词做简单考察;有的面试官要求高一些,会要求推导过程,甚至默写loss function公式。知识考察里面最难准备的,是需要对模型深入理解的知识点,比如:feature出现colinarity以后coeffiencit会有什么变化;training的时候数据shuffle和没有shuffle在会有什么区别。这类问题目前楼主还没有找到比较好的准备方法,只能多看一些面经,平时积累。再就是尽量对模型由一些感性的认识,避免硬背公式。
3. 统计计算:面试过很多公司都不考统计。但是也有一些考的,p-value,confidence interval,z test,t test,基本都是必考。有时候也会出一些比较棘手的题,比如给出成本组成,盈利和顾客数量的关系,顾客数量的分布,要求估算盈利,最大化盈利一类的。
4. 设计:这个方面的问题只遇到过一次,题目定义比较大。楼主遇到的是,设计一个机器学习系统,要求提取文章中同义语句,并且分析结果。这种问题网上免费资料不是很多,一般结合软件系统设计的套路,从需求入手,选择metric,提供几种算法,比较优缺点,选择feature,normailize数据。最后讨论数据量非常大情况,尤其内存装不下时候使用硬盘的设计。
下面是一些零散的整理笔记,帮助知识点学习,一共有四部分,这是第一部分,对刚入门data science的同学可能会比较有用。有不正确或者理解错误的地方,也请大家指正,希望大家都有好offer。
.google и
另外,求内推大厂的data science职位。. .и
2. 术语理解:variance analysis, A/B testing, statistical/practical significance a. 事件A的信息量可以由概率定义为:I(A)=−log(p(A))。熵是信息量的期望,用来表示不确定性,为:H(A) = E[I(A)] = -p(A)* log(p(A))。Cross-entropy,交叉熵为两个变量的不确定性,logistic regression的损失函数就是公式预测值(Hx)与实际值(Y)的交叉熵: b. random forest c. central limit theorem d. precision/recall e. KNN,K小,噪音多,K大,边界变模糊。缺点:寻找最近点计算量大 h. L1 and L2 regularization: 一范数是L1,二范数是L2。见3. 和4. L1允许一些参数为0。L1用于Sparse参数更好 i. Type I and Type II error in Hypothesis testing:Type 1 false positive,Type 2 false negative k. Precision, recall, accuracy l. ROC (receiver operating characteristic) curve 4. Overfitting: a. 用二范数或一范数; b. 减feature, dropout(for neural network,随机把一部分中间变量变为0,防止模型记忆数据). c. Cross-validation及时停止学习 d. 增加数据,数据量是feature的2n个,caltech说10倍以上for classification 5. Stochastic gradient descent: a) 随机把数据分成一小批一小批处理b) 两个方法加速收敛: 使用momentum代替偏导数更新参数值; 逐渐减小学习步长 6. Generative/discriminative model: Generative model:建立自然的概率分布,naïve bays Discriminative model:区分差别,logistic regression Let's say you have input data x and you want to classify the data into labels y. A generative model learns the joint probability distribution p(x,y) and a discriminative model learns the conditional probability distribution p(y|x) - which you should read as "the probability of y given x". Here's a really simple example. Suppose you have the following data in the form (x,y): (1,0), (1,0), (2,0), (2, 1) p(x,y) is y=0 y=1 ----------- x=1 | 1/2 0 x=2 | 1/4 1/4 p(y|x) is y=0 y=1 ----------- x=1 | 1 0 x=2 | 1/2 1/2 7. SVM运行feature多于数据的时候不好用,效率较低; 8. NB与LR,LR数据较多时优于NB。NB假设前提是个体独立,无法处理词组 9. 处理imbalanced data 10. K mean 选择K的个数:结合论文,使用elbow method on cost function。K过大,一些centroid 会没有memeber 12. Evaluate machine learning model: F score, ROC, cost function 13. Pick an algorithm. Write the psuedo-code for a parallel implementation: bag of words 14. Cost function使用二次方程,保证convex 15. ANN overfitting: a.增加数据,Caltech教授:数据量是自由度的至少10倍; b.regularization 16. Feature selection: a. Independent, no correlated, relevant, not noisy, fast training, not cause overfitting b. Non redundant, as simpler as possible c. 选择variance比较大的information多 d. 可feature scale之后用linear model学习一下,选择参数大的前几个 e. 用Decision tree 选择 f. 加new feature,训练好之后看cross validation或者F1 score g. PCA 减小feature 17.数据不平衡: a.数据0很多,1很少,那么在0中采样,然后忽略没有被采到的0。 b.复制数据1 c.增加1的权重 d.选择模型,选择logistic regression以后,调节限制值(不选用默认的0.5) 18. outlier,fraud detection有用。应去除,用residual error去除,不然会影响结果 19. residue and error 20. confusion matrix 21.学习abnormally detection 22.训练decision tree(ID3 or C4.5) b. C4.5: 对ID3的改进,使用normalized information gain. C4.5对于连续的attribute,会分成两组,小于等于阈值一组,大于阈值一组 23. 定义信息量可用entropy和Gini 24. bagging(Bootstrap aggregating) and boosting:
Random Forest is an extension over bagging. It takes one extra step where in addition to taking the random subset of data, it also takes the random selection of features rather than using all features to grow trees. 25. parametric model: estimate parameter from MLE, regression models, SVM, etc.; nonparametric model: quantile model, KNN, K-mean, decision tree, etc. 27. PCA和LDA(linear discriminant analysis)都可以用来减少feature。PCA保留variation最大的feature,LDA保留对于结果最容易进行分类的feature。 29. Heteroskedasticity occur mostly in regression modeling. As the X increases, the residual errors also increase. To resolve heteroskedasticity: 1. Redefining the variables using residual; 2. Weighted regression; 3. Transform the variables to another space. 30. Multicolinarity: To resolve: 1. Removed correlated features; 2. Use PCA to cut the number of predictors 31. Combination and permutation each have their own formula: 32. p-values: Suppose H0is true, p-value is the probability to get the observation result or even more extreme than the current observation result. Confidence interval: Given the probability range, calculating the range of variables. . Χ
补充内容 (2019-4-16 08:31):
本帖子后续,第二弹请猛点此链接:https://www.1point3acres.com/bbs ... &extra=page%3D3 |