Advanced Level Machine Learning Interview Q/a
Precision and recall are the two different ways of monitoring the power of machine learning implementation. They are mostly used at the same time. Precision answers the question, Out of the items that the classifier predicted to be relevant, how many are truly relevant?Whereas, recall answers the question, Out of all the items that are truly relevant, how many are discovered by the classifier?The basic meaning of precision is the fact of being exact and accurate. So the same will be followed in the machine learning model as well. If you have a set of items that your model requires to predict to be relevant.
The below figure shows the Venn diagram with precision and recall.
Precision and recall
Mathematically, precision and recall can be defined as the following:
 precision = # happy correct answers/# total items returned by ranker
 recall = # happy correct answers/# total relevant answers
Q25). How do you ensure which Machine Learning Algorithm to use?
It fully depends on the dataset you have and if the data is discrete then you may use SVM. In case the dataset is continuous then you can use linear regression.So there is no particular way that lets us know which Machine Learning algorithm to use, it all depends on the exploratory data analysis .EDA is like interviewing the dataset As part of our interview you may do the following:
Based on the above observations, choose the bestfit algorithm for a particular dataset.
Q27). Explain Correlation and Covariance?
What Are The Three Stages Of Building A Model In Machine Learning
The three stages of building a machine learning model are:

Model Building
 Check the accuracy of the model through the test data

Applying the Model
Make the required changes after testing and use the final model for realtime projects
Here, its important to remember that once in a while, the model needs to be checked to make sure its working correctly. It should be modified to make sure that it is uptodate.
Free Course: Introduction to ML with R
What Is The Application Procedure For This Purdue University
This AIML Course has a threestep application process:
Also Check: How To Make A Teacher Portfolio For Interviews
Amazon Data Engineer Introduction
Amazons Data Engineer interview process, sample interview questions, and instamentors preparation guide.
Amazon is one of the biggest technology companies with over 1 million global employees.
Due to its high employee turnover rate , they are always looking for new employees with tens of thousands of openings as of September 2021.
Business Intelligence Engineer requires a combination of skills in SQL and data engineering, statistical analysis, business analytics, and product management.
What Evaluation Approaches Would You Use To Gauge The Effectiveness Of An Ml Model
First, you would split the dataset into training and test sets. You could also use a crossvalidation technique to segment the dataset. Then, you would select and implement performance metrics. For example, you could use the confusion matrix, the F1 score and accuracy.
Youll want to explain the nuances of how a model is measured based on different parameters. Interviewees that stand out take questions like these one step further.
You May Like: What Good Interview Questions To Ask
What Are Loss Function And Cost Functions Explain The Key Difference Between Them
When calculating loss we consider only a single data point, then we use the term loss function.
Whereas, when calculating the sum of error for multiple data then we use the cost function. There is no major difference.
In other words, the loss function is to capture the difference between the actual and predicted values for a single record whereas cost functions aggregate the difference for the entire training dataset.
The Most commonly used loss functions are Meansquared error and Hinge loss.
MeanSquared Error: In simple words, we can say how our model predicted values against the actual values.
Hinge loss: It is used to train the machine learning classifier, which is
L = max
Where y = 1 or 1 indicating two classes and y represents the output form of the classifier. The most common cost function represents the total cost as the sum of the fixed costs and the variable costs in the equation y = mx + b
How Do You Handle Missing Or Corrupted Data In A Dataset
One of the easiest ways to handle missing or corrupted data is to drop those rows or columns or replace them entirely with some other value.
There are two useful methods in Pandas:
 IsNull and dropna will help to find the columns/rows with missing data and drop them
 Fillna will replace the wrong values with a placeholder value
Also Check: How To Give A Good Job Interview
Explain Lda For Unsupervised Learning
Latent Dirichlet Allocation is a common method for topic modeling. It is a generative model for representing documents as a combination of topics, each with their own probability distribution.
LDA aims to project the features of higher dimensional space onto a lowerdimensional space. This helps to avoid the curse of dimensionality.
Basic Aws Machine Learning Specialty Interview Questions
What is Bias Error in machine learning algorithm?
Bias is the common error in the machine learning algorithm due to simplistic assumptions. It may undermine your data and does not allow you to achieve maximum accuracy. Further generalizing the knowledge from the training set to the test sets would be highly difficult for you.
What do you understand by Variance Error in machine learning algorithm?
Variance error is common in machine learning when the algorithm is highly complex and difficult to understand as well. It may lead high degree of variation to your training data that can lead the model to overfit the data. Also, there could be so much noise for the training data that is not necessary in case of the test data.
What is the biasvariance tradeoff?
The biasvariance tradeoff is able to handle the learning errors effectively and manages noise too that happens due to underlying data, Essentially, this tradeoff will make the model more complex than usual but errors are reduced optimally.
How will you differentiate the supervised and unsupervised machine learning?
Supervised learning needs data in the labeled form. For example, if you wanted to classify the data then you should first label the data then classify it into groups. On the other hand, unsupervised does not need any data labeling explicitly.
How will you explain the Fourier Transformation in Machine Learning?
How will you differentiate the machine learning and deep learning algorithms?
Don’t Miss: How To Perform An Exit Interview
Amazon Applied Scientist Interview
Background: Master of CS with 3 YOE.
Onsite interview, there are 5 rounds.
Tech talk : presented one research project I did
Coding :
ML depth
 questions about NLP, RNN, LSTM, BERT etc
ML breadth
 More general questions, classical algorithms, maximum likelihood estimation, maximum a posteriori, overfitting etc
Problem solving
 How to build a search engine ? Which methods to use ? Choice of features etcCheck whether reaching the end of an array is possible given each position has number of steps you can go forward. Serialize Deserialize binary tree
ML questions
 Bias Variance tradeoff. Unsupervised learning . Spam filtering approach.
 There were general discussions about using models in text, information retrieval in practice as well.
Two weeks of preparation : ~50/60 easy and 25/30 mediums using this website :
2. How do you prepare for ML breath? How deep did interviewers ask you about Bert, deep learning?
For ML breadth mainly ISL + ESL are sufficient. For BERT I had questions about the architecture, what is bert ?, and they asked to explain the self attention mechanism, how is BERT trained, why transformers are better than lstm ? etc.
3. If you start again, what is the one thing you want to do differently in terms of preparation?
Briefly Explain Logistic Regression
Logistic regression is a classification algorithm used to predict a binary outcome for a given set of independent variables.
The output of logistic regression is either a 0 or 1 with a threshold value of generally 0.5. Any value above 0.5 is considered as 1, and any point below 0.5 is considered as 0.
Don’t Miss: How To Prepare Online Interview
Machine Learning Interview Questions
 How do to find thresholds for a classifier?
 Whats the difference between logistic regression and support vector machines? What’s an example of a situation where you would use one over the other?
 Explain ICA and CCA. How do you get a CCA objective function from PCA?
 What is the relationship between PCA with a polynomial kernel and a single layer autoencoder? What if it is a deep autoencoder?
 What is “random” in random forest? If you use logistic regression instead of a decision tree in random forest, how will your results change?
 What is the interpretation of an ROC area under the curve as an integral?
Featured Question
Let’s say we want to build a model to predict booking prices on Airbnb.
Between linear regression and random forest regression, which model would perform better and why?
Explain The Stages For Building An Ml Model
This will largely depend on the model at hand, so you could ask clarifying questions. But generally, the process is as follows:
Recall = TP / = 10/50 = 0.2 = 20%
Specificity = TN / = 15/50 = 0.3 = 30%
Precision = TP/ = 10 / 45 = 0.2 = 22%
Also Check: What To Say When Scheduling An Interview
Explain Classification And Regression
Classification is a process of categorizing a given set of data into classes, It can be performed on both structured or unstructured data. Regression in machine learning consists of mathematical methods that allow data scientists to predict a continuous outcome based on the value of one or more predictor variables . Linear regression is probably the most popular form of regression analysis because of its easeofuse in predicting and forecasting.
Unique About Amazon’s Interview
Heavily focused on leadership principles.
During the onsite interview is five hours with five different interviewers.
Each interviewer will cover 2 or 3 leadership principles and one technical skill, which means a total of 3 or 4 sections, 23 focusing on leadership principles and only one on technical competency.
Each round is about one hour, with a fewminute break between each round.
This guide will walk you through what Amazon Business Intelligence Engineer interview process looks like, sample interview questions. As well as a Amazon Business Intelligence Engineer case study .
Also Check: How To Prepare For An Interview
Explain How You Would Develop A Data Pipeline
Data pipelines enable us to take a data science model and automate or scale it. A common data pipeline tool is Apache Airflow, and Google Cloud, Azure, and AWS are used to host them.
For a question like this, you want to explain the required steps and discuss real experience you have building data pipelines.
The basic steps are as follows for a Google Cloud host:
What Is The Default Method For Splitting In Decision Trees
The default method is the Gini Index, which is the measure of impurity of a particular node. Essentially, it calculates the probability of a specific feature that is classified incorrectly. When the elements are linked by a single class, we call this pure.
You could also use Random Forest, but the Gini Index is preferred because it isnt computationally intensive and doesnt involve logarithm functions.
Additional intermediate questions may include:
 What is a BoxCox transformation?
 Water Tapping problem
 Explain the advantages and disadvantages of decision trees.
 What is the exploding gradient problem when using back propagation technique?
 What is a confusion matrix? Why do you need it?
Recommended Reading: How To Succeed In A Phone Interview
How Do You Communicate With Both Technical And Non
Machine Learning Engineers dont just work with Data Scientists and other deeply technical roles, and being able to convey the importance of what youre doing is both crucial and a bit of a challenge for many ML experts. You need to show your interviewer that youre adept at written and verbal communication and understand how to simplify complex concepts. Something to keep in mind is that a hiring manager might even be part of that nontechnical audience.
 Tell me about a time when you had to convince others to take your position on a specific matter. What was the outcome?
 How do you make sure projects and tasks stay on schedule?
 How do you handle disagreements on your team?
 Tell me about a time when something went wrong at work and you took control.
 How do you deal with people who disagree with you?
 How would you go about simplifying a complex issue in order to explain it to a client or colleague?
 How would you go about persuading someone to see things your way at work?
 How would you go about explaining a complex idea/problem to a client who was already frustrated?
 What would you do if there was a breakdown in communication at work?
 Talk about a successful presentation you gave and why you think it did well.
 Talk about a time when you made a point that you knew your colleagues would be resistant to.
 Is it more important to be a good listener or a good communicator?
Amazon Business Intelligence Engineer Interview Case Study
It was June 2020. Lisa had just graduated a month ago and was still enjoying her break.
She studied statistics from a California state university and was going to join a startup in SF as a data scientist.
One week before her original start date, she got a call from the startups HR, who told her, unfortunately, due to Covid, their budget was cut, and her role got canceled.
It was a rather frustrating experience, to say at least, let alone it was meant to be Lisas first job, and she had never experienced anything like that in her life.
Feeling embarrassed, Lisa kept her head down for about a month. Then, towards the end of August, she decided to get herself up and give the job search another try.
In the next six months, she applied for hundreds of jobs, talked to many companies, got into several final rounds of interviews, but still no offer.
She didnt stop. Instead of just sitting there, she went to the internet, tried her best to learn whats needed to land a job, and reached out to us at instamentor through a friend.
And today, its our great pleasure to announce that, after a couple of months of preparations, mock interviewing, and relentless practicing, Lisa has just landed a great job offer at Amazon.
And she is going to start in 2 weeks as an entrylevel Business Intelligence Engineer.
This time, she decides no more long break before her job starts.
We think that is a very smart decision .
TLDR
Read Also: How To Ace A Phone Screening Interview
What Is The Difference Between Inductive And Deductive Learning
The main difference between inductive and deductive reasoning is that inductive reasoning aims at developing a theory while deductive reasoning aims at testing an existing theory. Inductive reasoning moves from the specific observations to broad generalizations, and deductive reasoning the other way around.
What Is Unsupervised Learning
Unsupervised learning is also a type of machine learning algorithm used to find patterns on the set of data given. In this, we dont have any dependent variable or label to predict. Unsupervised Learning Algorithms:
 Clustering,
 Neural Networks and Latent Variable Models.
Example:
In the same example, a Tshirt clustering will categorize as collar style and V neck style, crew neck style and sleeve types.
Also Check: Sample Case Manager Interview Questions
What Are Support Vectors In Svm
A Support Vector Machine is an algorithm that tries to fit a line between the different classes that maximizes the distance from the line to the points of the classes.
In this way, it tries to find a robust separation between the classes. The Support Vectors are the points of the edge of the dividing hyperplane as in the below figure.
False Positive  True Negative 
In binary classification we consider the F1 score to be a measure of the models accuracy. The F1 score is a weighted average of precision and recall scores.
F1 = 2TP/2TP + FP + FN
We see scores for F1 between 0 and 1, where 0 is the worst score and 1 is the best score. The F1 score is typically used in information retrieval to see how well a model retrieves relevant results and our model is performing.
What Are The Differences Between Machine Learning And Deep Learning
Machine Learning  



Also Check: How To Write A Follow Up Letter After An Interview