Machine Learning Interview questions
A machine learning interview is definitely not a pop quiz and one must know what to expect going in. In our earlier posts, we have discussed about the different kind of machine learning interview questions that are likely to be asked in an analytic job related interview.
The main focus of this blog post is to give prospective machine teaching engineers a knick-knack of the kind of machine learning interview questions that are likely to be asked in a machine learning job interview. machine learning online training helps you to learn more techniques.
Machine Learning Interview Questions and Answers
1) What is the difference between inductive machine learning and deductive machine learning?
In inductive machine learning, the model learns by examples from a set of observed instances to draw a generalized conclusion whereas in deductive learning the model first draws the conclusion and then the conclusion is drawn. Let’s understand this with an example, for instance, if you have to explain to a kid that playing with fire can cause burns. There are two ways you can explain this to kids, you can show them training examples of various fire accidents or images with burnt people and label them as “Hazardous”.
In this case the kid will learn with the help of examples and not play with fire. This is referred to as Inductive machine learning. The other way is to let your kid play with fire and wait to see what happens. If the kid gets a burn they will learn not to play with fire and whenever they come across fire, they will avoid going near it. This is referred to as deductive learning.
2) How will you know which machine learning algorithm to choose for your classification problem?
If accuracy is a major concern for you when deciding on a machine learning algorithm then the best way to go about it is test a couple of different ones (by trying different parameters within each algorithm ) and choose the best one by cross-validation.
A general rule of thumb to choose a good enough machine learning algorithm for your classification problem is based on how large your training set is. If the training set is small then using low variance/high bias classifiers like Naïve Bayes is advantageous over high variance/low bias classifiers like k-nearest neighbour algorithms as it might overfit the model. High variance/low bias classifiers tend to win when the training set grows in size.
3) Why is Naïve Bayes machine learning algorithm naïve?
Naïve Bayes machine learning algorithm is considered Naïve because the assumptions the algorithm makes are virtually impossible to find in real-life data. Conditional probability is calculated as a pure product of individual probabilities of components.
This means that the algorithm assumes the presence or absence of a specific feature of a class is not related to the presence or absence of any other feature (absolute independence of features), given the class variable. learn machine learning online more effectively.
For instance, a fruit may be considered to be a banana if it is yellow, long and about 5 inches in length. However, if these features depend on each other or are based on the existence of other features, a naïve Bayes classifier will assume all these properties to contribute independently to the probability that this fruit is a banana. Assuming that all features in a given dataset are equally important and independent rarely exists in the real-world scenario.
4) How will you explain machine learning in to a layperson?
Machine learning is all about making decisions based on previous experience with a task with the intent of improving its performance. There are multiple examples that can be given to explain machine learning to a layperson –
- Imagine a curious kid who sticks his palm
- You have observed from your connections that obese people often tend to get heart diseases thus you make the decision that you will try to remain thin otherwise you might suffer from a heart disease. You have observed a ton of data and come up with a general rule of classification.
- You are playing blackjack and based on the sequence of cards you see, you decide whether to hit or to stay. In this case based on the previous information you have and by looking at what happens, you make a decision quickly.
5) List out some important methods of reducing dimensionality.
- Combine features with feature engineering.
- Use some form of algorithmic dimensionality reduction like ICA or PCA.
- Remove collinear features to reduce dimensionality.
6) Name some feature extraction techniques used for dimensionality reduction.
- Independent Component Analysis
- Principal Component Analysis
- Kernel Based Principal Component Analysis
7) List some use cases where classification machine learning algorithms can be used.
- Natural language processing (Best example for this is Spoken Language Understanding )
- Market Segmentation
- Text Categorization (Spam Filtering )
- Bioinformatics (Classifying proteins according to their function)
- Fraud Detection
- Face detection
8) What kind of problems does regularization solve?
Regularization is used to address overfitting problems as it penalizes the loss function by adding a multiple of an L1 (LASSO) or an L2 (Ridge) norm of your weights vector w.
9) How much data will you allocate for your training, validation and test sets?
There is no to the point answer to this question but there needs to be a balance/equilibrium when allocating data for training, validation and test sets.
If you make the training set too small, then the actual model parameters might have high variance. Also, if the test set is too small, there are chances of unreliable estimation of model performance. A general thumb rule to follow is to use 80: 20 train/test spilt. After this the training set can be further split into validation sets.
10) Which one would you prefer to choose – model accuracy or model performance?
Model accuracy is just a subset of model performance but is not the be-all and end-all of model performance. This question is asked to test your knowledge on how well you can make a perfect balance between model accuracy and model performance.
11) What is the most frequent metric to assess model accuracy for classification problems?
Percent Correct Classification (PCC) measures the overall accuracy irrespective of the kind of errors that are made, all errors are considered to have same weight.
12) When will you use classification over regression?
Classification is about identifying group membership while regression technique involves predicting a response. Both techniques are related to prediction, where classification predicts the belonging to a class whereas regression predicts the value from a continuous set.
Classification technique is preferred over regression when the results of the model need to return the belongingness of data points in a dataset to specific explicit categories. (For instance, when you want to find out whether a name is male or female instead of just finding it how correlated they are with male and female names.
13) Why is Manhattan distance not used in kNN machine learning algorithm to calculate the distance between nearest neighbours?
Manhattan distance has restrictions on dimensions and calculates the distance either vertically or horizontally. Euclidean distance is better option in kNN to calculate the distance between nearest neighbours because the data points can be represented in any space without any dimension restriction.
Machine Learning Interview Questions asked at Capital One
1) Given two years of transaction history, what features will you use to predict the credit risk?
2) Differentiate between gradient boosted tree and random forest machine learning algorithm.
3) How will you use existing features to add new features?
4) Considering that you have 100 data points and you have to predict the gender of a customer. What are the difficulties that could arise?
5) How will you set the threshold for credit card fraud detection model?
A machine learning interview is a compound process and the final result of the interview is determined by multiple factors and not just by looking at the number of right answers given by the candidate. If you really want that machine learning job, it’s going to take time and dedication as you practice multiple ways to answer the above listed machine learning interview questions, but hopefully it is the enjoyable kind. You will learn a lot and get a good deal of knowledge preparing for your next machine learning interview with the help of these questions. Go through Machine Learning Online Training India for more details.
Machine learning interview questions updated on this blog have been collected from various sources like actual interview experiences of data scientists, discussions on quora, facebook, job portals and other forums,etc. To contribute to this blogpost and help the learning community.