11 Most Common Machine Learning Interview Questions

Reading Time: 4 minutes

Machine Learning and Data Science roles usually call for a rigorous interview process where the candidates are judged on various aspects and qualities such as technical and programming skills, ability to solve open-ended problems, data analysis skills and knowledge of methods, communication skills, and finally the clarity pf basics. Here, we have compiled a list of some of the most common machine learning interview questions that you might face during an interview. 


  1. What are the different types of Learning/Training Models in ML?

The three different types of Machine Learning are:

Supervised Learning – The machine learns using labelled data. The model is trained on an existing data set before it starts making decisions with the new data.

Unsupervised Learning – The machine is trained on unlabelled data and without any proper guidance. It automatically infers patterns and relationships in the data by creating clusters. The model learns through observations and deduced structures in the data.

Reinforcement Learning – The model learns through a trial and error method. This kind of learning involves an agent that will interact with the environment to create actions and then discover errors or rewards of that action. 


  1. What is the difference between deep learning and machine learning?

Machine Learning involves algorithms that learn from patterns of data and then apply it to decision making. Deep Learning, on the other hand, is able to learn through processing data on its own and is quite similar to the human brain where it identifies something, analyse it, and makes a decision.


  1. How do you select important variables while working on a data set? 

There are various means to select important variables from a data set that include the following:

a. Identify and discard correlated variables before finalizing on important variables

b. The variables could be selected based on ‘p’ values from Linear Regression

c. Forward, Backward, and Stepwise selection 

d. Lasso Regression 

e. Random Forest and plot variable chart 

Top features can be selected based on information gain for the available set of features.


  1. How are covariance and correlation different from one another?

Covariance measures how two variables are related to each other and how one would vary with respect to changes in the other variable. If the value is positive it means there is a direct relationship between the variables and one would increase or decrease with an increase or decrease in the base variable respectively, given that all other conditions remain constant. 

Correlation quantifies the relationship between two random variables and has only three specific values, i.e., 1, 0, and -1. 1 denotes positive relationship, -1 denotes negative relationship, and 0 denotes that the two variables are independent of each other.


  1. When does regularization come into play in Machine Learning?

At times when the model begins to underfit or overfit, regularization becomes necessary. It is a regression that diverts or regularizes the coefficient estimates towards zero. It reduces flexibility and discourages learning in a model to avoid the risk of overfitting. The model complexity is reduced and it becomes better at predicting.


  1. What are bias and variance?

Both are errors in Machine Learning Algorithms. When the algorithm has limited flexibility to deduce the correct observation from the dataset, it results in bias. On the other hand, variance occurs when the model is extremely sensitive to small fluctuations. 

Machine Learning Interview Questions - Bias and Variance
Source: Understanding the Bias-Variance Tradeoff: Scott Fortmann – Roe


  1. What is the difference between stochastic gradient descent (SGD) and gradient descent (GD)?

Gradient Descent and Stochastic Gradient Descent are the algorithms that find the set of parameters which will minimize a loss function. 

The difference is that in Gradient Descend, all training samples are evaluated for each set of parameters. While in Stochastic Gradient Descent only one training sample is evaluated for the set of parameters identified. 


  1. Can you mention some advantages and disadvantages of decision trees?

The advantages of decision trees are that they are easier to interpret, are nonparametric and hence robust to outliers, and have relatively few parameters to tune.

On the other hand, the disadvantage is that they are prone to overfitting. 


  1. What is the Principle Component Analysis?

The idea here is to reduce the dimensionality of the data set by reducing the number of variables that are correlated with each other. Although the variation needs to be retained to the maximum extent. 

The variables are transformed into a new set of variables that are known as Principal Components’. These PCs are the eigenvectors of a covariance matrix and therefore are orthogonal.


  1. What are ensemble methods and how are they superior to individual models?

Ensemble methods are machine learning techniques that combine multiple base models to produce a single optimal predictive model.

They are superior to individual models as they reduce variance, average out biases, and have lesser chances of overfitting.


  1. What are outliers? Mention three methods to deal with outliers.

A data point which is considerably distant from the other similar data points is known as an outlier. They may occur due to experimental errors or variability in measurement. They are problematic and can mislead a training process, which eventually results in longer training time, inaccurate models, and poor results.

The three methods to deal with outliers are:

Univariate method – looks for data points having extreme values on a single variable

Multivariate method – looks for unusual combinations on all the variables

Minkowski error – reduces the contribution of potential outliers in the training process

Machine Learning Interview Questions


Stay tuned to this page for more such information on interview questions and career assistance. If you are want to prepare more to land your dream job in Machine Learning, you can upskill with Great Learning’s PG program in Machine Learning, and learn all about Data Science along with great career support.

Also, Read – Advantages of pursuing a career in Machine Learning