Paypal DS电面二

  1. 1到100的一个array,随便取出其中一个数。array剩下99个数,请问怎么找出哪一个数被取出来了。
    5500-sum(array)

  2. 描述一下ML建模过程。
    Assume it’s classification problem.
    Is it a categorical feature or numeric feature?
    If categorical, impute the unknown ones with a new class
    If numeric, then impute the value that best separates the positive and negative classes.
    Then use tree based algorithms or directly use tree based alg.s without imputation.

  3. 如果有一个feature,有99%的value missing。但是这个feature highly correlated with the target。建模的时候用不用这个feature,用的话怎么处理。

关于第三个题,我的想法是,

  1. 先问一下面试官是怎么发现highly correctated,这种related是指有很强的线性关系,还是base on expertise this feature is imporatant. 因为有的时候,如果一个feature太强,也不太好,就要考虑data leakage或者self-predictive.
  2. 然后我觉得这个其实depends on specific feature啊,general来讲,99% missing了。。是真的想删这个feature。。。我的做法
    是,先不用这个feature build model,if the performance of the model is really bad, 再consider这个feature。
  3. 如果一定要用这个99% missing的feature。。首选一些robust的model,不行就先把这个feature 当做predictive variable, 用其他feature model等把这个feature estimate 好了,再用这个feature来build别的model?不知道可不可行