Please enable JavaScript to view the comments powered by Disqus. Top 20 Machine Learning Interview Questions & Answers

 

Top 20 Machine Learning Interview Questions & Answers

NovelVista

NovelVista

Last updated 18/11/2020


Top 20 Machine Learning Interview Questions & Answers

We don’t need to explain to you that Machine Learning is apparently the new hot topic of the world of technology. Right?

After Netflix saved 1 billion dollars with the help of Machine Learning monitored personalized recommendation, let’s fast forward to 2020, the year we are living in right now. According to an article by Venture Harbour, almost 85% of business interaction is being handled without human involvement now. How?

Simple! 

It’s all being possible because of Machine Learning. 

Machine learning is the study of computer algorithms that improve automatically through experience. It is basically a subset of artificial intelligence. Machine learning algorithms build a model based on sample data, known as "training data", in order to make predictions or decisions without being explicitly programmed to do so. Machine learning algorithms are used in a wide variety of applications, such as email filtering and computer vision, where it is difficult or infeasible to develop conventional algorithms to perform the needed tasks.

So for obvious reasons, companies are pretty much interested in hiring Machine Learning professionals in the organization nowadays. And to be a part of Machine Learning team, you need to go through the Machine Learning interview first, which can be a bit tacky. 

But fret not! These 20 Machine Learning Interview questions are to help you just to pass through that!

Take a look!

1. Explain the trade-off between bias and variance.

Bias is an error because of incorrect or excessively oversimplified suppositions in the learning algorithm you're utilizing. This can prompt the model underfitting your information, making it difficult for it to have high prescient exactness and for you to sum up your insight from the training set to the test set. 

Variance is an error due to an excessive amount of multifaceted nature in the learning algorithm you're utilizing. This prompts the calculation being profoundly touchy to high levels of variety in your training information, which can lead your model to overfit the information. You'll be conveying an excessive amount of commotion from your preparation information for your model to be valuable for your test information. 

The bias-variance decay basically disintegrates the taking in mistake from any calculation by adding the inclination, the change, and a touch of unchangeable blunder because of clamor in the basic dataset. Basically, in the event that you make the model more mind-boggling and add more factors, you'll lose predisposition yet increase some difference — to get the ideally decreased measure of blunder, you'll need to tradeoff inclination and change. You don't need either high bias or high variance in your model.

2. State the difference between supervised and unsupervised machine learning.

Ans. Supervised learning demands training labeled data. For instance, to do characterization (a supervised learning task), you'll have to initially mark the information you'll use to prepare the model to order information into your named gatherings. Unsupervised learning, interestingly, doesn't need labeling data expressly.

3. How is KNN different from k-means clustering?

Ans. K-Nearest Neighbors happens to be a supervised classification algorithm, while k-means clustering is an unsupervised clustering algorithm. While the components may appear to be comparable from the outset, what this truly implies is that all together for K-Nearest Neighbors to work, you need to name information you need to characterize an unlabeled point into (along these lines the closest neighbor part). K-means clustering requires just a bunch of unlabeled focuses and a limit: the calculation will take unlabeled focuses and continuously figure out how to group them into bunches by registering the mean of the separation between various focuses. 

The basic distinction here is that KNN needs labeled points and supervised learning, while k-means doesn't—and is subsequently unsupervised learning.

4. How does a ROC curve works?

Ans.  The ROC curve is basically a graphical image of the contrast between true positive rates and the false positive rate at various thresholds. It can also be used as a proxy for the trade-off for the sensitivity of the model (true positives) vs the fall-out or the probability for triggering a false alarm (false positives).

5. What are precision and recall?

Ans. Recall is otherwise called the genuine positive rate: the measure of positives your model cases contrasted with the real number of positives there are all through the information. Precision is otherwise called the positive prescient worth, and it is a proportion of the measure of precise positives your model cases contrasted with the quantity of positives it really asserts. It very well may be simpler to consider review and exactness with regards to a situation where you've anticipated that there were 10 apples and 5 oranges for a situation of 10 apples. You'd have an amazing recall (there are really 10 apples, and you anticipated there would be 10) however 66.7% precision on the grounds that out of the 15 occasions you anticipated, just 10 (the apples) are right.

6. Explain Bayes’ theorem.

Ans. In probability theory and statistics, Bayes's theorem (alternatively Bayes's law or Bayes's rule), describes the probability of an event, based on prior knowledge of conditions that might be related to the event. For example, if the risk of developing health problems is known to increase with age, Bayes's theorem allows the risk to an individual of a known age to be assessed more accurately (by conditioning it on his age) than simply assuming that the individual is typical of the population as a whole.

Bayes's theorem is stated mathematically as:

P(A|B)=P(B|A)P(A)/ P(B)

Where A and B are events and P(B) is not equal to 0.

Numerically, it's communicated as the genuine positive pace of a condition test partitioned by the amount of the bogus positive pace of the populace and the genuine positive pace of a condition. Let's assume you had a 60% possibility of really having seasonal influenza after an influenza test, however out of individuals who had this season's virus, the test will be bogus half of the time, and the general populace just has a 5% possibility of having this season's virus. Okay really have a 60% possibility of having influenza in the wake of having a positive test? 

Bayes' Theorem says no. It says that you have a (.6 * 0.05) (True Positive Rate of a Condition Sample)/(.6*0.05)(True Positive Rate of a Condition Sample) + (.5*0.95) (False Positive Rate of a Population) = 0.0594 or 5.94% possibility of getting an influenza. 

Bayes' Theorem is the premise behind a part of AI that most quite incorporates the Naive Bayes classifier. That is something essential to consider when you're confronted with Machine Learning questions.

7. Why is “Naive” Bayes naive?

Ans. Notwithstanding its reasonable applications, particularly in text mining, Naive Bayes is considered "Naive" on the grounds that it makes a supposition that is basically difficult to find, in actuality, information: the contingent likelihood is determined as the unadulterated result of the individual probabilities of segments. This infers the supreme freedom of highlights — a condition presumably never met, in actuality.

8. What is the difference between L1 and L2 regularization?

Ans. L2 regularization will in general spread error among all the terms, while L1 is more twofold/meager, with numerous factors either being appointed a 1 or 0 in weighting. L1 relates to setting a Laplacean prior to the standing, while L2 compares to a Gaussian prior.

9. Explain your favorite calculation to me in less than a minute?

Ans. This kind of inquiry tests your comprehension of how to discuss unpredictable and specialized subtleties with balance and the capacity, to sum up rapidly and proficiently. Settle on sure you have a decision and ensure you can clarify various algorithms so just and adequately that a five-year-old could get a handle on the fundamentals!

10. Explain the difference between type 1 and type 2 errors.

Ans. Try not to imagine that this is a misleading question! Many machine learning questions addresses will be an endeavor to hurl essential inquiries at you just to ensure you're large and in charge and you've arranged the entirety of your bases. 

Type I error is a false positive, while Type II error is a false negative. Quickly expressed, Type I error implies guaranteeing something has happened when it hasn't, while Type II error implies that you don't guarantee anything is occurring when truth be told something is. 

A shrewd method to consider this is to consider Type I error as telling a man he is pregnant, while Type II error implies you tell a pregnant lady she isn't carrying a child.

11. Describe the Fourier transform?

Ans. A Fourier transform is a nonexclusive technique to disintegrate conventional capacities into a superposition of symmetric capacities. Or on the other hand as this more natural instructional exercise puts it, given a smoothie, it's the manner by which we discover the formula. The Fourier transformation finds the set of cycle velocities, amplitudes, and stages to coordinate any time signal. A Fourier transformation changes a signal from a time over to recurrence space—it's an exceptionally basic approach to separate highlights from sound signs or other time arrangements, for example, sensor information.

12. What is deep learning, and how does it contrast with other machine learning algorithms?

Ans. Deep learning is a subset of machine learning that is worried about neural organizations: how to utilize backpropagation and certain standards from neuroscience to all the more precisely model enormous arrangements of unlabelled or semi-organized information. In that sense, profound learning speaks to an unsupervised learning algorithm that learns portrayals of information using neural nets.

13. State the difference between a generative and discriminative model.

Ans. A generative model will learn classifications of information while a discriminative model will just gain proficiency with the qualification between various classifications of information. Discriminative models will commonly beat generative models on characterization assignments.

14. What cross-validation technique would you use on a time series dataset?

Ans. Rather than utilizing standard k-folds cross-validations, you need to focus on the way that a period arrangement isn't haphazardly distributed information—it is inalienably requested by sequential requests. In the event that an example arises in later time-frames, for instance, your model may in any case get on it regardless of whether that impact doesn't hold in prior years! 

You'll need to accomplish something like forward-chaining where you'll have the option to demonstrate on past information at that point take a gander at front faced information.

  • Fold 1 : training [1], test [2]
  • Fold 2 : training [1 2], test [3]
  • Fold 3 : training [1 2 3], test [4]
  • Fold 4 : training [1 2 3 4], test [5]
  • Fold 5 : training [1 2 3 4 5], test [6]

15. How is a decision tree pruned?

Ans. Pruning is the thing that occurs in decision trees when branches that have feeble prescient force are eliminated to decrease the unpredictability of the model and increment the prescient precision of a choice tree model. Pruning can happen base up and top-down, with approaches, for example, diminished blunder pruning and cost unpredictability pruning. 

Decreased error pruning is maybe the most straightforward adaptation: supplant every hub. On the off chance that it doesn't diminish prescient exactness, keep it pruned. While straightforward, this heuristic really comes very near a methodology that would streamline for greatest exactness.

16. Model accuracy is more important or model performance?

Ans. This inquiry tests your grip on the subtleties of ML model execution! ML inquiries questions regularly look towards the subtleties. There are models with higher precision that can perform more awful in prescient force—how can that bode well? 

All things considered, it has an inseparable tie to how model accuracy is just a subset of model performance, and at that, an occasionally deceptive one. For instance, on the off chance that you needed to recognize misrepresentation in a gigantic dataset with an example of millions, a more accurate model would probably foresee no fraud at all if just a huge minority of cases were a fraud. Nonetheless, this would be futile for a predictive model—a model intended to discover extortion that affirmed there was no misrepresentation by any means! Questions like this assist you with showing that you comprehend the model accuracy isn't the most important thing in the world of model performance.

17. What’s the F1 score? How would you use it?

Ans. The F1 score is a proportion of a model's presentation. It is a weighted normal of the accuracy and review of a model, with results watching out for 1 being the best, and those keeping an eye on 0 being the most noticeably awful. You would utilize it in grouping tests where genuine negatives don't make a difference much.

18. How would you handle an imbalanced dataset?

Ans. An imbalanced dataset is a point at which you have, for instance, an order test and 90% of the information is in one class. That prompts issues: an exactness of 90% can be slanted in the event that you have no prescient force on the other class of information! Here are a couple of strategies to overcome the challenge:

  1. Collect more data to even the imbalances in the dataset.
  2. Resample the dataset to correct for imbalances.
  3. Try a different algorithm altogether on your dataset.

What's significant here is that you have a sharp sense of what harm an imbalanced dataset can cause, and how to adjust that.

19. When should you use classification over regression?

Ans. Classification produces discrete qualities and dataset to severe classes, while regression gives you persistent outcomes that permit you to all the more likely recognize contrasts between singular focuses. You would utilize classification over regression on the off chance that you needed your outcomes to mirror the belongingness of information focuses in your dataset to certain unequivocal classifications (ex: If you needed to know whether a name was male or female instead of exactly how corresponded they were with male and female names.)

20. Name an example where ensemble techniques might be useful.

Ans. Ensembling techniques utilize a blend of learning algorithms to upgrade better prescient execution. They ordinarily decrease overfitting in models and make the model more powerful (probably not going to be impacted by little changes in the preparation information). 

You could show a few instances of Ensembling techniques (bagging, boosting, the "bucket of models" strategy) and exhibit how they could increment prescient force.

Conclusion:

So now you know all the common Machine Learning interview questions. But, Machine learning interviews check your practical knowledge too, as well as theoretical. And we think you can do better in that field with a little bit of training. Check out our Machine Learning training and see if that suits your needs!

Topic Related Post

Top 20 Agile Scrum Interview Questions For Your Big Breakthrough In 2020
Top 20 Agile Scrum Interview Questions For Your Big Breakthrough In 2020
Top 20 interview questions to prepare for ISO27001 Lead Auditor
Top 20 interview questions to prepare for ISO27001 Lead Auditor
Top 20 Microsoft Azure Questions For Your Next Interview
Top 20 Microsoft Azure Questions For Your Next Interview

About Author

NovelVista Learning Solutions is a professionally managed training organization with specialization in certification courses. The core management team consists of highly qualified professionals with vast industry experience. NovelVista is an Accredited Training Organization (ATO) to conduct all levels of ITIL Courses. We also conduct training on DevOps, AWS Solution Architect associate, Prince2, MSP, CSM, Cloud Computing, Apache Hadoop, Six Sigma, ISO 20000/27000 & Agile Methodologies.

 
 

SUBMIT ENQUIRY

* Your personal details are for internal use only and will remain confidential.

 
 
 
 
 
 
 
 
 

Upcoming Events

ITIL-Logo-BL
ITIL

Every Weekend

AWS-Logo-BL
AWS

Every Weekend

Dev-Ops-Logo-BL
DevOps

Every Weekend

Prince2-Logo-BL
PRINCE2

Every Weekend

Topic Related

Take Simple Quiz and Get Discount Upto 50%
     
  18002122003
 
  
  • Disclaimer
  • ITIL®, PRINCE2®, PRINCE2® Agile & MSP are registered trade mark of AXELOS Limited, used under permission of AXELOS Limited. The Swirl logo™ is a trade mark of AXELOS Limited, used under permission of AXELOS Limited. All rights reserved.
  • DevOps is a registered trademark of DevOps Institute Limited. All rights reserved.