Last update: 11/16/2018
This is a personal summary of common DS/ML interview questions and will be regularly updated, you are welcome to pull request or discuss the answer with me:)
To be a good DS or MLE, you have to answer most of these questions below quickly and precisely:)
Here are some books and MOOCs that may be useful for you.
MOOCs:
- Stanford CS231n
- Stanford CS224n
- Coursera Deep learning specialization
- Berkeley CS 188: Introduction to Artificial Intelligence
- Deep Reinforcement Learning - UC Berkeley
- Oxford Deep NLP 2017 course
- Yida Xu's Machine Learning Course
- IFT6266, Deep Learning, graduate class at U. Montreal
Books:
- Pattern Recognition and Machine Learning
- The Element of Statistical Learning
- Machine Learning: A Probabilistic Perspective
- Deep Learning Book
- Reinforcement Learning: An Introduction
- Artificial Intelligence A Modern Approach
- Introduce yourself.
- Tell me your past internship or some other projects.
- What is linear regression? What is logistic regression? What is the difference?
- How to find the best parameter for linear regression? / How to optimize the model?
- Please write down the close form solution for linear regression?
- What is Stochastic Gradient Descent or Mini-batch Gradient Descent? What is the advantage? and disadvantages?
- What is mean square error? What is Cross Entropy? What is the difference? Also please write down the formular of these two cost function.
- What is Softmax? What is relationship between Softmax and Logistic Regression?
- Explain and derive the SGD for Logistic Regression and Softmax?
- Does global optimal can be reached by SGD, why?
- What is the Sigmoid function? What is the characteristic of Sigmoid? What is the advantages and disadvantages of Sigmoid function?
- What are L1 and L2? And their difference?
- From the view of Bayesian, what's the difference between L1 and L2?
- What is overfitting?
- How can you know your model is overfitted or not?
- What is the Bias-Variance Trade-off?
- How to prevent overfitting?
- What is cross validation?
- Let is consider you are training a classifier to classify the cat pictures taken by cell phone. You have 10k cat pictures that taken by cell phone users. How would you split the pictures into training/validation/test set? Now you have got 100k cat pictures from Internet, what dataset would you like to choose to put these 100k cat pictures in?
- For training/validation/test set, which two sets are most important that you have to keep the distribution of data samples the same?
- What is data augmentation? Do you know any technique to augment data?
- What is F1 score? What are recall and precision?
- What is AUC?
- How would you handle data imbalance problem?
- What is Decision Tree?
- What is Information Gain?
- What is Geni Index?
- What is the advantages and disadvantages of ID3?
- What is Random Forrest?
- What is Bagging?
- What is AdaBoost and the relation between Adaboost and exponential loss function?
- What is Gradient Boosting?
- What is the idea of Bagging and Stacking?
- Do you know XGBoost? And what is the idea of XGBoost?
- Write down Naive Bayes equation.
- Given an example, calculate designate probability by using Bayes Equation.
- What's Clustering?
- What's K-means? Implement K-means by Python and Numpy. What's the relationship between K-means and EM?
- What's the pros and cons of K-means?
- What's the complexity of K-means?
- What's PCA and SVD? Given the SVD funtion, please implement PCA.
- Do you know T-sne, simply explain it to me?
- What is Hidden Markov Model?
- What is the assumption that HMM made?
- There are three matrices in HMM, what are they?
- What is the three problems of HMM?
- What is the Viterbi Algorithm? And its complexity?
- How to optimize the parameters of HMM?
- In what situation you would likt to use HMM?
- (Bonus) What are MEMM and CRF?
- What is suppor vector?
- What is the idea of SVM?
- Explain the idea of kernel method?
- What is the slack factor in SVM?
- What is the loss function of SVM?
- What is the idea of EM algorithm?
- In what case we would like to use EM?
- What is the Markov Decision Process?
- What is the Bellman Equation?
- What is the Q-function.
- The difference between Policy Gradient and Q-learning.
- What is the relationship between Logistic Regression and Feedforward Neural Networks?
- What is Sigmoid, Tanh, Relu? And their pros and cons?
- What are RNN, LSTM, GRU? And their pros and cons?
- What are gradient explosion and vanishing?
- What is CNN, explain the process of CNN and the idea.
- What is the differenct between Momentum and Adam optimizer?
- What is the pros and cons of Tensorflow and PyTorch?
- What is the compuational graph of deep learning frameworks?
- Why GPU can accelerate the compuation of deep learning models?
- Why deep learning models are powerful now?
- What is Batch Normalization and Layer Normalization?
- What is Dropout?
- In what case you would like to use transfer learning? How would you fine-tune the model?
- Do you know any techniques to initialize deep learning models?
- Why zero initialization is a pitfall for deep learning?
- Implement a single hidden layer FNN by Python and Numpy.
- What is tf-IDF?
- What is word embedding and its idea? What is the difference between sampled softmax and negative sampling? Do you know the relationship between negative sampling and Pointwise Mutual Information(Bouns)
- What are unigram and bigram?
- What is the attention machanism?
- (Bonus) Explain LDA topic model.
- What is the difference between simple CNN and Inception Net and ResNet?
- What are the common techniques to preprocess the image data?
- What are the kernel and pooling in CNN?
- What is GAN, the structure and the way we train it.
- What is the idea of Map Reduce?
You are given a specific case and you need to give a solution for the problem.
- select, group by, left, right, inner outter join...
- What is the key difference between Tuple and List?
- What is the list comprehension?
- Use ML packages to complete certain tasks.
- Some medium level (refer to Leetcode) coding questions.
- How to handle exceptions in Python.
- Implement K-means, KNN, Linear Regression, Logistic Regression, Simple Neural Network.
- Use Pandas to manipulate data.