With the rise in the demand for machine learning related careers, many are now opting to learn similar courses online as it is viewed as a lucrative career option. While there is a plethora of job opportunities in this field, candidates tend to miss out due to a lack of deep clarity about the right machine learning interview questions. While most machine learning interview questions for freshers tend to be regarding the basic concepts, many interviewers are now looking to hire candidates who have an in-depth understanding of the field. This article will provide you with some basic interview questions for machine learning, as well as some advanced interview Q & A for machine learning candidates.

Machine learning Interview Questions for Freshers

1. What are the different types of Machine learning?

This is the most basic interview question for machine learning almost every fresher will have to answer first. 

Machine learning has three different subtypes –

  • Supervised machine learning

Easiest to implement, supervised machine learning makes use of labelled data. With the help of a predefined data set, the machine model forms relationships between the input and output. It is task-driven. Overtime, the machine will learn to accurately associate the examples with their labels and generate correct labels on it’s own when  presented with an entirely new example input.

  • Unsupervised machine learning

Unlike supervised machine learning, unsupervised machine learning has no labels. It’s data driven, and groups / clusters the data based on it’s own set of parameters by finding structure in the data that is fed. Patterns are identified to create clusters. Here, fewer human intervention is required for the task as no data labelling is needed. However, one of the disadvantages of this category is that it is difficult to measure the accuracy.

  • Reinforcement

Reinforcement learning uses trial and error method to find a suitable action in order to maximise a desirable reward. It is commonly used in video games in building AI. Unlike supervised learning, there is no labelled data set in reinforcement learning and learning is through experience here.

2. How does Deep Learning differ from Machine Learning?

This is an essential machine learning interview question that every candidate should expect to be asked during an interview. 

Though Deep Learning and Machine Learning may seem to overlap, the key difference between the two is with respect to how the system works with the data presented to it. While the former makes use of layers of Artificial Neural Networks, the latter relies on structured data. If the data is large and unstructured, Deep Learning is preferred as it does not make use of labels. While Deep Learning takes longer to train, Machine Learning is less time consuming. In simple words, Deep Learning can be said to be an advanced form of Machine Learning.

3. Explain Classification and Regression.

Classification and regression are the two subtypes of supervised machine learning and are used for prediction . The key difference between the two is based on the type of output variable generated. While regression generates continuous or numerical variables (eg. age, salary, price), classification generates discrete or categorical variables (eg. true or false, male or female). Some of the problems classification algorithms can be used to solve are image segmentation, speech recognition, detecting spam emails etc. Regression algorithms can be used to solve price prediction problems, weather prediction etc.

4. What do you understand by Precision and Recall?

This is another typical machine learning interview question for freshers. Both Precision and Recall are metrics for model evaluation. Precision, as the word implies, denotes the reliability of the model by giving us an idea about how many of the correctly predicted cases turned out to be positive. It is also known as the positive predictive value.

Mathematically,      

                                                  TP
 Precision  =       ___________

                TP + FP

Recall, also known as true positive rate, is a measure of the proportion of the actual positives identified correctly.

Mathematically,    

                                            TP

               Recall =        ___________

TP + FN

PS: TP – True Positive, FP – False Positive, TN – True Negative, FN  – False Negative

In order to truly check whether a model is effective, it is advised to check both precision and recall.

5. What is a Confusion Matrix? 

Also known as an error matrix, confusion matrix is a Y x Y matrix (Y = number of target classes) that is used to test or understand the performance of a classification model. In layman terms, it tells us whether the model is ‘good’ or not. It provides us with not just an evaluation of the model, but also why exactly the model did not work and how to correct it.

6. What is the difference between Inductive and Deductive learning? 

Inductive learning uses observations to draw conclusions whereas Deductive learning uses conclusions to draw observations from them.

7. What is the difference between Type I and Type II error?

This can seem to be a tricky concept for many, but it is one of the most fundamental machine learning interview questions you must be prepared to answer.

Type I error is a false positive and Type II error is a false negative. In other words, a Type I error occurs when you say something has happened, when it actually hasn’t. Type II error is an error that is made by saying nothing has happened, when something has actually happened.

8. What is a ROC curve?

A Receiver Operating Characteristic curve is a probability curve that plots True Positive rate and False Positive rate at different classification thresholds. It helps to visually describe the performance of any classification model.

9. What are the different types of machine learning clustering techniques?

  • Hierarchical – It categorises data into a hierarchy of groups or clusters, without having a fixed number of clusters. It is less quicker when compared to K-Means clustering technique.
  • K-Means – One of the most frequently used clustering techniques, it is optimal for a large dataset. It categorises data points into a set number of K clusters or groups. It is used even when information about the data is insufficient. However, it can be a little difficult to predict the K value.
  • Probabilistic – Here, data points are grouped into clusters based on a probabilistic scale.

10. What is the difference between a discriminative and generative model?

A discriminative model learns the distinction between categories of data and discriminates or classifies the data points, whereas a generative model generates complete data by learning the distribution of data

ML Interview Questions for Experienced Candidates

1.  What is Entropy and what is Information Gain?

Entropy is a measure of how disorderly your data is. A higher value denotes a higher level of disorder. 

Information Gain is a measure of the reduction in entropy or a measure of how much the disorder has reduced after the dataset is split.

2. What is the Ensemble Learning technique?

Ensemble Learning technique is a technique used to improve overall performance by combining predictions of different learning algorithms, like averaging, boosting, bagging, blending, etc.

3. Talk about any algorithm of your choice in less than a minute. Mention any one advantage and anyone disadvantage of using it.

A highly probable machine learning interview question for experienced candidates, it’s necessary that you are well versed with one or two algorithms in detail.

Decision Tree Algorithm – A supervised learning algorithm, decision tree algorithm portrays a graphical representation of all the solutions to a given problem. It is used as a predictive analysis model and provides us with conclusions about an item’s target value. It starts with a root node, also known as the parent node, which is then subdivided into different sets. It can have branches which are formed by splitting the tree. We are finally left with leaf nodes which are the final output nodes. Although it is mostly used with classification problems, it can be used with both classification and regression problems. 

One major advantage of the decision tree algorithm is that it is easy to understand. It can also work with categorical as well as numerical inputs. One disadvantage is that it becomes difficult to interpret larger trees. 

4. Explain any two methods for screening outliers.

Boxplot – One of the simplest ways to detect outliers, this method describes the distribution of data visually using a graphical display method. It shows the upper and lower quartiles, and the interquartile range or IQR (distance between these two ends of the box). Any points that lie outside this range are outliers.

Proximity-based Models – K-means clustering model is a type of proximity based model that helps to detect outliers. While the data points form clusters based on similarities, the outliers also form a separate cluster making it easy to detect them.

5. What is the Kernel trick? 

It is a method which helps to bridge linearity and non linearity in the support vector machines model by helping map data into higher dimensions in an efficient manner. It provides a shortcut by working in the original feature space without having to do computations with the data in a higher dimensional space.

While these machine learning interview questions and answers will definitely benefit your interview preparation, it also becomes important to dwell further into the subject matter for an in-depth understanding. Springboard offers a variety of online machine learning courses that is guaranteed to provide you with a transformational learning experience.