歡迎光臨
每天分享高質量文章

推薦 :谷歌微軟等科技巨頭資料科學崗位面試題(108道)

本文轉自:蝸牛讀寫 微信公眾號(id:chuhanread),本文獲授權轉發 。

原文:http://www.learndatasci.com/data-science-interview-questions/

A fresh scrape from Glassdoor gives us a good idea about what applicants are asked during a data scientist interview at some of the top companies. Unfortunately for us, almost every company has their interviewees sign NDAs. Since Glassdoor allows anonymity, a few brave souls have given us some fantastic examples of what they were asked during the interview process at top companies like Facebook, Google, and Microsoft.


來自 Glassdoor 的最新資料可以告訴我們各大科技公司最近在招聘面試時最喜歡向候選人提什麼問題。首先有一個令人惋惜的結論:根據統計,幾乎所有的公司都有著自己的不同風格。由於 Glassdoor 允許匿名提交內容,很多樂於分享的應聘者向大家提供了 Facebook、谷歌、微軟等大公司的面試題。


General Questions 一般問題

Apple

  1. Suppose you’re given millions of users that each have hundreds of transactions and these millions of transactions are for tens of thousands of products. How would you group the users together in meaningful segments?

    如果你有幾百萬用戶,每個用戶都會發生數百筆交易,這些交易存在於數十種產品中。你該如何把這些用戶細分成有意義的幾類?

Microsoft

  1. Describe a project you’ve worked on and how it made a difference.

    描述一個你曾經參與的專案,以及它的優點。

  2. How would you approach a categorical feature with high-cardinality?

    如何處理具有高基數(high-cardinality)的類屬特征?

  3. What would you do to summarize a Twitter feed?

    如果想要給 Twitter feed 寫 summarize,你要怎麼辦?

  4. What are the steps for wrangling and cleaning data before applying machine learning algorithms?

    在應用機器學習演算法之前糾正和清理資料的步驟是什麼?

  5. How do you measure distance between data points?

    如何測量資料點之間的距離?

  6. Define variance.

    請定義一下方差。

  7. Describe the differences between and use cases for box plots and histograms.

    請描述箱形圖(box plot)和直方圖(histogram)之間的差異,以及它們的用例。

Twitter

  1. What features would you use to build a recommendation algorithm for users?

    你會使用什麼功能來為用戶構建推薦演算法?

Uber

  1. Pick any product or app that you really like and describe how you would improve it.

    選擇任何一個你真正喜歡的產品或應用程式,並描述如何改善它。

  2. How would you find an anomaly in a distribution ?

    如何在分佈中發現異常?

  3. How would you go about investigating if a certain trend in a distribution is due to an anomaly?

    如何檢查分佈中的某個趨勢是否是由於異常產生的?

  4. How would you estimate the impact Uber has on traffic and driving conditions?

    如何估算 Uber 對交通和駕駛環境造成的影響?

  5. What metrics would you consider using to track if Uber’s paid advertising strategy to acquire new customers actually works? How would you then approach figuring out an ideal customer acquisition cost?

    你會考慮用什麼指標來跟蹤 Uber 付費廣告策略在吸引新用戶上是否有效?然後,你想用什麼辦法估算出理想的客戶購置成本?

LinkedIn

  1. Big Data Engineer Can you explain what REST is?

    (大資料工程師)請解釋 REST 是什麼。


Machine Learning Questions 機器學習問題

Google

  1. Why do you use feature selection?

    為什麼要使用特征選擇(feature selection)?

  2. What is the effect on the coefficients of logistic regression if two predictors are highly correlated? What are the confidence intervals of the coefficients?

    如果兩個預測變數高度相關,它們對邏輯回歸繫數的影響是什麼?繫數的置信區間是什麼?

  3. What’s the difference between Gaussian Mixture Model and K-Means?

    高斯混合模型(Gaussian Mixture Model)和 K-Means 之間有什麼區別?

  4. How do you pick k for K-Means?

    在 K-Means 中如何拾取 k?

  5. How do you know when Gaussian Mixture Model is applicable?

    你如何知道高斯混合模型是不是適用的?

  6. Assuming a clustering model’s labels are known, how do you evaluate the performance of the model?

    假設聚類模型的標簽是已知的,你如何評估模型的性能?

Microsoft

  1. What’s an example of a machine learning project you’re proud of?

    你有哪些引以為豪的機器學習專案?

  2. Choose any machine learning algorithm and describe it.

    隨意選擇一個機器學習演算法,並描述它。

  3. Describe how Gradient Boosting works.

    請解釋 Gradient Boosting 是如何工作的。

  4. Data Mining Describe the decision tree model.

    (資料挖掘工程師)請解釋決策樹模型。

  5. Data Mining What is a neural network?

    (資料挖掘工程師)什麼是神經網絡?

  6. Explain the Bias-Variance Tradeoff

    請解釋偏差方差權衡(Bias-Variance Tradeoff)。

  7. How do you deal with unbalanced binary classification?

    如何處理不平衡二進制分類?

  8. What’s the difference between L1 and L2 regularization?

    L1 和 L2 正則化之間有什麼區別?

Uber

  1. What sort features could you give an Uber driver to predict if they will accept a ride request or not? What supervised learning algorithm would you use to solve the problem and how would compare the results of the algorithm?

    你會通過哪種特征來預測 Uber 司機是否會接受訂單請求?你會使用哪種監督學習演算法來解決這個問題,如何比較演算法的結果?

LinkedIn

  1. Name and describe three different kernel functions and in what situation you would use each.

    點出及描述三種不同的內核函式,在哪些情況下使用哪種?

  2. Describe a method used in machine learning.

    隨意解釋機器學習里的一種方法。

  3. How do you deal with sparse data?

    如何應付稀疏資料?

IBM

  1. How do you prevent overfitting?

    如何防止過擬合(overfitting)?

  2. How do you deal with outliers in your data?

    如何處理資料中的離群值?

  3. How do you analyze the performance of the predictions generated by regression models versus classification models?

    如何評估邏輯回歸與簡單線性回歸模型預測的性能

  4. How do you assess logistic regression versus simple linear regression models?

    如何確定邏輯回歸與簡單線性回歸模型?

  5. What’s the difference between supervised learning and unsupervised learning?

    監督學習和無監督學習有什麼區別?

  6. What is cross-validation and why would you use it?

    什麼是交叉驗證(cross-validation),為什麼要使用它?

  7. What’s the name of the matrix used to evaluate predictive models?

    用於評估預測模型的矩陣的稱為什麼?

  8. What relationships exist between a logistic regression’s coefficient and the Odds Ratio?

    邏輯回歸繫數和勝算比(Odds Ratio)之間存在怎樣的關聯?

  9. What’s the relationship between Principal Component Analysis (PCA) and Linear & Quadratic Discriminant Analysis (LDA & QDA)

    主成分分析(PCA)與線性判別分析(LDA)、二次判別分析(QDA)之間存在怎樣的關聯

  10. If you had a categorical dependent variable and a mixture of categorical and continuous independent variables, what algorithms, methods, or tools would you use for analysis?

    如果你有一個因變數分類,又有一個連續自變數的混合分類,你將使用什麼演算法,方法或工具進行分析?

  11. Business Analytics What’s the difference between logistic and linear regression? How do you avoid local minima?

    (行業分析師)邏輯與線性回歸有什麼區別?如何避免區域性極小值?

Salesforce

  1. What data and models would would you use to measure attrition/churn? How would you measure the performance of your models?

    你會使用哪些資料和模型來測量損耗/流失?如何測試模型性能?

  2. Explain a machine learning algorithm as if you’re talking to a non-technical person.

    請嘗試向非技術人員解釋一種機器學習演算法。

Capital One

  1. How would you build a model to predict credit card fraud?

    如何構建一個模型來預測信用卡詐騙?

  2. How do you handle missing or bad data?

    如何處理丟失或不良資料?

  3. How would you derive new features from features that already exist?

    如何從已存在的特征中匯出新的特征?

  4. If you’re attempting to predict a customer’s gender, and you only have 100 data points, what problems could arise?

    如果你試圖預測客戶的性別,但只有 100 個資料點,可能會出現什麼問題?

  5. Suppose you were given two years of transaction history. What features would you use to predict credit risk?

    在擁有兩年交易歷史的情況下,哪些特征可以用來預測信用風險?

  6. Design an AI program for Tic-tac-toe

    設計一個用來下井字棋的人工智慧程式。

Zillow

  1. Explain overfitting and what steps you can take to prevent it.

    請解釋過度擬合,以及如何防止過度擬合。

  2. Why does SVM need to maximize the margin between support vectors?

    為什麼 SVM 需要在支持向量之間最大化邊緣?


Hadoop

Twitter

  1. How would you use Map/Reduce to split a very large graph into smaller pieces and parallelize the computation of edges according to the fast/dynamic change of data?

    如何使用 Map/Reduce 將非常大的圖形分割成更小的塊,並根據資料的快速/動態變化並行計算它們的邊緣?

  2. Data Engineer Given a list of followers in the format:123, 345234, 678345, 123…Where column one is the ID of the follower and column two is the ID of the followee. Find all mutual following pairs (the pair 123, 345 in the example above). How would you use Map/Reduce to solve the problem when the list does not fit in memory?

    (資料工程師)給定一個串列:123, 345234, 678345, 123…其中第一列是粉絲的 ID,第二列是被粉者的 ID。查找所有相互後續對(上面的示例中的對是 123,345)。當串列超出記憶體時,如何使用 Map / Reduce 來解決問題?

Capital One

  1. Data Engineer What is Hadoop serialization?

    (對資料工程師)什麼是 Hadoop 序列化(serialization)?

  2. Explain a simple Map/Reduce problem.

    闡述一個簡單的 Map / Reduce 問題。


Hive

LinkedIn

  1. Data Engineer Write a Hive UDF that returns a sentiment score. For example, if good = 1, bad = -1, and average = 0, then a review of a restaurant states “Good food, bad service,” your score might be 1 – 1 = 0.

    (資料工程師)請編寫傳回情感分數的 Hive UDF。例如,假如好=1,壞=-1,平均數=0,那麼對餐廳做評價時因為「食物好,服務差」,你的分數可能為 1 – 1 = 0


Spark

Capital One

  1. Data Engineer Explain how RDDs work with Scala in Spark

    (資料工程師)闡釋使用 Scala 語言時RDD 在 Spark 中是如何工作的?


Statistics & Probability Questions

Google

  1. Explain Cross-validation as if you’re talking to a non-technical person.

    請嘗試向非技術人員闡釋交叉驗證(Cross-validation)。

  2. Describe a non-normal probability distribution and how to apply it.

    請描述一下非正態概率分佈以及該如何應用?

Microsoft

  1. Data Mining Explain what heteroskedasticity is and how to solve it

    (資料挖掘)請解釋異方差(heteroskedasticity)是什麼,以及如何解決它。

Twitter

  1. Given Twitter user data, how would you measure engagement?

    在給定 Twitter 用戶資料的情況下,你該如何衡量參與度?

Uber

  1. What are some different Time Series forecasting techniques?

    時間序列預測技術有什麼不同?

  2. Explain Principle Component Analysis (PCA) and equations PCA uses.

    解釋原理組件分析(PCA)及其 使用的方程。

  3. How do you solve Multicollinearity?

    如何解決多重共線性(Multicollinearity)?

  4. Analyst Write an equation that would optimize the ad spend between Twitter and Facebook.

    (分析師)請嘗試列出優化我們在 推特和臉書上的廣告費用支出的方程。

Facebook

  1. What’s the probability you’ll draw two cards of the same suite from a single deck?

    在一副牌中抽取兩張,出現同一花色的概率是多少?

IBM

  1. What are p-values and confidence intervals?

    什麼是 p-value 和置信區間?

Capital One

  1. Data Analyst If you have 70 red marbles, and the ratio of green to red marbles is 2 to 7, how many green marbles are there?

    (資料分析師)如果你有 70 個紅色彈珠,綠色和紅色彈珠的比例是 2 :7,有多少綠色彈珠?

  2. What would the distribution of daily commutes in New York City look like?

    紐約市的通勤資料看起來應該遵從什麼分佈?

  3. Given a die, would it be more likely to get a single 6 in six rolls, at least two 6s in twelve rolls, or at least one-hundred 6s in six-hundred rolls?

    一個骰子,在扔 6 次的情況下出現 1 個 6 的幾率,與扔 12 次的情況下出現至少兩個 6 的幾率,和扔 600 次出現至少 100 次 6 的幾率相比哪個大?

PayPal

  1. What’s the Central Limit Theorem, and how do you prove it? What are its applications?

    什麼是中心極限定理(Central Limit Theorem),如何證明它?它的應用方向是什麼?


Programming & Algorithms 編程和演算法

Google

  1. Data Analyst Write a program that can determine the height of an arbitrary binary tree

    (資料分析師)請寫一個程式可以判定二叉樹的高度。

Microsoft

  1. Create a function that checks if a word is a palindrome.

    請創建一個函式檢查一個詞是否具有迴文結構。

Twitter

  1. Build a power set.

    請構建一個冪集(power set)。

  2. How do you find the median of a very large dataset?

    請問如何在一個巨大的資料集中找到中值?

Uber

  1. Data Engineer Code a function that calculates the square root (2-point precision) of a given number. Follow up: Avoid redundant calculations by now optimizing your function with a caching mechanism.

    (資料工程師)編寫一個函式用來計算給定數字的平方根(精確到百分位)。隨後:避免冗餘計算,現在使用快取機制優化你的功能。

Facebook

  1. Suppose you’re given two binary strings, write a function adds them together without using any builtin string-to-int conversion or parsing tools. For example, if you give your function binary strings 100 and 111, it should return 1011. What’s the space and time complexity of your solution?

    假設給定兩個二進制字串,寫一個函式將它們添加在一起,而不使用任何內置的字串到 int 轉換或解析工具。例如:如果給函式二進制字串 100 和 111,它應該傳回 1011。你的解決方案的空間和時間複雜性如何?

  2. Write a function that accepts two already sorted lists and returns their union in a sorted list.

    編寫一個函式,它接受兩個已排序的串列,併在排序串列中傳回它們的並集。

LinkedIn

  1. Data Engineer Write some code that will determine if brackets in a string are balanced

    (資料工程師)請編寫一些代碼來確定字串中的左右括號是否是平衡的?

  2. How do you find the second largest element in a Binary Search Tree?

    如何找到二叉搜索樹中第二大的元素?

  3. Write a function that takes two sorted vectors and returns a single sorted vector.

    請編寫一個函式,它接受兩個排序的向量,並傳回一個排序的向量。

  4. If you have an incoming stream of numbers, how would you find the most frequent numbers on-the-fly?

     如果你有一個輸入的數字流,如何在運行過程中找到最頻繁出現的數字?

  5. Write a function that raises one number to another number, i.e. the pow() function.

    編寫一個函式,將一個數字增加到另一個數字,就像 pow()函式一樣。

  6. Split a large string into valid words and store them in a dictionary. If the string cannot be split, return false. What’s your solution’s complexity?

    將大字串拆分成有效欄位並將它們儲存在 dictionary 中。如果字串不能拆分,傳回 false。你的解決方案的複雜性如何?

Salesforce

  1. What’s the computational complexity of finding a document’s most frequently used words?

    查找文件最常用的詞的計算複雜性是什麼?

  2. If you’re given 10 TBs of unstructured customer data, how would you go about finding extracting valuable information from it?

    如果給你10 TBs的非結構化客戶資料,你會如何發現提取有價值的信息呢?

Capital One

  1. Data Engineer How would you ‘disjoin’ two arrays (like JOIN for SQL, but the opposite)?

    (對資料工程師)如何「拆散」兩個數列(就像 SQL 中的 JOIN 反過來)?

  2. Create a function that does addition where the numbers are represented as two linked lists.

    請創建一個用於添加的函式,數字表示為兩個鏈表。

  3. Create a function that calculates matrix sums.

    請創建一個計算矩陣的函式。

  4. How would you use Python to read a very large tab-delimited file of numbers to count the frequency of each number?

    如何使用 Python 讀取一個非常大的製表符分隔的數字檔案,來計算每個數字出現的頻率?

PayPal

  1. Write a function that takes a sentence and prints out the same sentence with each word backwards in O(n) time.

    請編寫一個函式,讓它能在 O(n)的時間內取一個句子並逆向打印出來。

  2. Write a function that takes an array, splits the array into every possible set of two arrays, and prints out the max differences between the two array’s minima in O(n) time.

     請編寫一個函式,從一個陣列中拾取,將它們分成兩個可能的陣列,然後打印兩個陣列之間的最大差值(在 O(n) 時間內)。

  3. Write a program that does merge sort.

    請編寫一個執行合併排序的程式。

SQL Questions

Microsoft

  1. Data Analyst Define and explain the differences between clustered and non-clustered indexes.

    (資料分析師)定義和解釋聚簇索引和非聚簇索引之間的差異。

  2. Data Analyst What are the different ways to return the rowcount of a table?

    (資料分析師)傳回表的行計數有哪些不同的方法?

Facebook

  1. Data Engineer If you’re given a raw data table, how would perform ETL (Extract, Transform, Load) with SQL to obtain the data in a desired format?

    (資料工程師)如果給定一個原始資料表,如何使用 SQL 執行 ETL(提取,轉換,加載)以獲取所需格式的資料?

  2. How would you write a SQL query to compute a frequency table of a certain attribute involving two joins? What changes would you need to make if you want to ORDER BY or GROUP BY some attribute? What would you do to account for NULLS?

    如何編寫 SQL 查詢來計算涉及兩個連接的某個屬性的頻率表?如果你想要 ORDER BY 或 GROUP BY 一些屬性,你需要做什麼變化?你該怎麼解釋 NULL?

LinkedIn

  1. Data Engineer How would you improve ETL (Extract, Transform, Load) throughput?

    (資料工程師)如何改進 ETL(提取,轉換,加載)的吞吐量?


Brain Teasers & Word Problems

Google

  1. Suppose you have ten bags of marbles with ten marbles in each bag. If one bag weighs differently than the other bags, and you could only perform a single weighing, how would you figure out which one is different?

    假設你有 10 包彈球,每包裡面都是 10 個彈球。如果其中一包的重量和其他的不同,但你只能進行一次稱重,你該用什麼辦法?

Facebook

  1. You are about to hop on a plane to Seattle and want to know if you should carry an umbrella. You call three friends of yours that live in Seattle and ask each, independently, if it’s raining.Each of your friends will tell you the truth ⅔ of the time and mess with you by lying ⅓ of the time. If all three friends answer “Yes, it’s raining,” what is the probability that is it actually raining in Seattle?

    你打算坐飛機去西雅圖,想知道是不是需要帶傘,於是你分別打電話給三位在西雅圖的朋友。每個朋友都有 2/3 的幾率說真話,1/3 的幾率在騙你。如果他們都說「會下雨」,西雅圖下雨的概率是多少?

Uber

  1. Imagine you are working with a hospital. Patients arrive at the hospital in a Poisson Distribution, and the doctors attend to the patients in a Uniform Distribution. Write a function or code block that outputs the patient’s average wait time and total number of patients that are attended to by doctors on a random day.

    想象一下你在一家醫院工作。患者來就診的頻率符合泊松分佈,而醫生照顧患者的頻率符合均勻分佈。請寫一個函式或一段代碼來輸出患者的平均等待時間和醫生在某日的參與度。

Facebook

  1. Imagine there are three ants in each corner of an equilateral triangle, and each ant randomly picks a direction and starts traversing the edge of the triangle. What’s the probability that none of the ants collide? What about if there are N ants sitting in N corners of an equilateral polygon?

    假如在一個等邊三角形的三個角上都有一隻螞蟻,每隻隨機選擇方向然後直走一直到另一個邊緣,三隻螞蟻互相不交匯的幾率是多少?如果有 n 只螞蟻在 n 角形中,概率又是多少?

  2. How many trailing zeros are in 100 factorial (i.e. 100!)?

    在 100! 的結果里有多少個零?

LinkedIn

  1. Imagine you’re climbing a staircase that contains n stairs, and you can take any number k steps. How many distinct ways can you reach the top of the staircase? (This is a modification of the original stair step problem)

    你正在攀爬一個 n 階的樓梯,你可以採取任何數量的 k 個步驟。你到達樓梯頂部有多少不同的方式?(這是樓梯問題的修改版)

版權宣告:本號內容部分來自互聯網,轉載請註明原文鏈接和作者,如有侵權或出處有誤請和我們聯繫。

END

版權宣告:本號內容部分來自互聯網,轉載請註明原文鏈接和作者,如有侵權或出處有誤請和我們聯繫。


關聯閱讀:

原創系列文章:

1:從0開始搭建自己的資料運營指標體系(概括篇)

2 :從0開始搭建自己的資料運營指標體系(定位篇)

3 :從0開始搭建自己的資料運營體系(業務理解篇)

4 :資料指標的構建流程與邏輯

5 :系列 :從資料指標到資料運營指標體系

6:   實戰 :為自己的公號搭建一個資料運營指標體系

7:  從0開始搭建自己的資料運營指標體系(運營活動分析)

資料運營 關聯文章閱讀:  

運營入門,從0到1搭建資料分析知識體系    

推薦 :資料分析師與運營協作的9個好習慣

乾貨 :手把手教你搭建資料化用戶運營體系

推薦 :最用心的運營資料指標解讀

乾貨 : 如何構建資料運營指標體系

從零開始,構建資料化運營體系

乾貨 :解讀產品、運營和資料三個基友關係

乾貨 :從0到1搭建資料運營體系

資料分析、資料產品 關聯文章閱讀:

乾貨 :資料分析團隊的搭建和思考

關於用戶畫像那些事,看這一文章就夠了

資料分析師必需具備的10種分析思維。

如何構建大資料層級體系,看這一文章就夠了

乾貨 : 聚焦於用戶行為分析的資料產品

如何構建大資料層級體系,看這一文章就夠了

80%的運營註定了打雜?因為你沒有搭建出一套有效的用戶運營體系

從底層到應用,那些資料人的必備技能

讀懂用戶運營體系:用戶分層和分群

做運營必須掌握的資料分析思維,你還敢說不會做資料

合作請加qq:365242293  


更多相關知識請回覆:“ 月光寶盒 ”;

資料分析(ID : ecshujufenxi )互聯網科技與資料圈自己的微信,也是WeMedia自媒體聯盟成員之一,WeMedia聯盟改寫5000萬人群。

赞(0)

分享創造快樂