Be Ready for These 13 Interview Questions About Machine Learning

Updated on April 17, 2020
KCO profile image

Katy mentors and educates young professionals beginning their careers and financial journeys to make informed decisions.

Machine Learning Interview Questions

The interview for a machine learning engineer is going to be very technical, but it's your chance to show what makes you the best candidate.

Get prepared with these artificial intelligence and machine learning interview questions and how to answer them.

Interviewers can also use this list to build an interview that reveals the ability of machine learning candidates. You’ll learn their technical skills and their ability to think critically.

Questions to expect in a machine learning interview.
Questions to expect in a machine learning interview. | Source


Be prepared to show off your knowledge of shallow learning algorithms. Unless you’re applying for a strict Data Scientist position, the interviewer isn’t going to go into too much nitty-gritty with algorithm questions. But you should be able to talk about the inputs and what algorithms are best used for what application.

1. When would you use KNN (k nearest neighbors)?

KNN is usually used for classification. It’s one of the simplest and most used algorithms in machine learning.

Your answer might vary based on your experience but I would consider KNN in most cases when the classes and features are labelled

2. Describe how SVM (Support Vector Machine) works. How can you use SVMs with non-linear data?

SVM creates a hyperplane or decision boundary to classify input data based on which side of the boundary the new data lies. They are optimized by increasing the margin between the boundary and data points as much as possible.

Remember that kernels are often stacked with SVMs. Kernels transform non-linear data into linear data so that an SVM can be optimized.

Frameworks and Languages

The interviewer will want to know what languages and frameworks you have used. They will also use these questions to get an idea of how quickly you will pick up a new framework and how in tune you are with what frameworks are available for artificial intelligence.

3. Why do you like using <language from your resume>?

Anything on your resume is fair game. Especially the programming languages you list in your skills. So be prepared to talk about all the ins and outs.

If the truthful answer is that you only used that language because that's what they used at your last job, that's fine. Just be prepared to talk about the advantages and disadvantages of a language from a machine learning perspective.

4. Tell me about your experience using <framework the company uses>?

If you are familiar with the framework the company uses, this should be easy for you. Certainly, if you listed them on your resume you should be able to talk all about them.

If you haven’t used that specific framework much that’s not necessarily a deal-breaker. Any software engineer worth his/her salt should be able to adapt to new a framework without a huge learning curve. The job description will likely list a few of the main platforms the company uses. Do your research on those before the interview starts.

Some aspects to focus on when researching a new framework:

  • What tasks does it handle best?

  • What are the strengths/weaknesses?

  • Which languages interface well with the framework?

You need to be able to talk intelligently about that environment.

If the framework is open-source then try it out on your personal computer. There’s also some affordable online classes you can take that will give you a temporary license.

Building Neural Networks

5. What would you do if your algorithm doesn’t converge?

This is an open-ended question that should be easy for anyone working in machine learning.

Decreasing the learning rate (alpha) is a good first step. As an interviewer, I’d like to see the candidate describe a more logical approach to finding alpha. Try a strategic range of alphas and plot the cost function over number of iterations.

6. When would you use Gradient Descent vs Normal Equation?

You might asked about the pros and cons of different methods to optimize an algorithm.

Remember that the normal equation can’t be used with classification, so this comparison only matters for regression. The normal equation is chosen when the number of features isn’t very large. It has an advantage over gradient descent in that you don’t have to choose a learning rate or iterate.

If there are a lot of features then the normal equation is very slow so I would choose gradient descent.

Expect questions on building neural networks in an interview for a machine learning or artificial intelligence position.
Expect questions on building neural networks in an interview for a machine learning or artificial intelligence position. | Source

Evaluating Models (Performance)

One of the primary jobs of a machine learning engineer is to optimize a neural network and understand how well it performs.

7. Why is overfitting bad and how can you fix it?

Overfitting is when an algorithm fits training data very well but does accurately predict new situations. Obviously this is bad because it’s not useful for real world situations.

Describe a few ways that overfitting can be improved. Adding a regularization term and increasing lambda can have good results. Decreasing the number of features or reducing the order of polynomials are options but aren’t the right choices in every situation.

8. How do you know if your model is good?

This is similar to the above question where the candidate needs to understand how to evaluate models.

You can explain how available training data is split up into Training Data, Validation Data and Test Data and what each is used for. I’d want to hear a candidate talk about varying the polynomial degree and lambda and comparing the error in the validation data.


Come to the interview ready to discuss previous projects. As with any interview, anything on your resume is fair game.

Have a portfolio of projects from work, school or your personal use ready. You might be restricted in what you can say from a Non-Disclosure Agreement or classified work so be clear on what you can discuss.

Here are some questions you can expect:

9. What was your favorite machine learning project you worked on?

For the sake of this interview you might pick the project most relevant to the job as your favorite. This will give you a chance to highlight your relevant experience.

If you’d rather talk about which one was your actual favorite to give the hiring manager an idea of whether you’ll like the new position that’s a good idea too.

10. Tell me about a tough problem you solved.

Pick a problem that can be easily described. Part of answering this question well is showing that you can describe complex machine learning problems to a non-technical audience.

When you describe your solution don’t take the credit unless it really was all your effort. Playing up the contributions of your team will show you’re a good team player. If applicable, point out the customer, schedule and budget impacts this issue has. Show how your contributions you add value to the bottom line, not just the immediate problem.

Behavioral Questions

Don’t forget that the interview will most likely include behavioral questions. And for many engineers and data scientists this is the hardest part! We spend so much time preparing for the technical questions we forget that also going to be evaluated by how we fit into the team.

The more important behavioral questions are below so you can prepare ahead of time. For the questions that ask you to describe a specific time, use the STAR model to outline your answers. Read more on the STAR response here if you don’t know what it is.

11. Tell me about a time you had a conflict at work.

This is a common question for any position. It gives the interviewer a chance to see what it’s like to work with you.

Have a situation in mind before this question comes up. Quickly describe the issue and spend more time explaining how you handled it and what you learned. Show that you can move past conflicts with maturity.

10. Give an example of when you made a mistake at work.

Obviously don’t make it a huge mistake but find an honest one that you learned from. In your recounting of it, own up to the mistake and focus on how you fixed it. Comment on your appreciation for testing or validating that caught the mistake (if it was s technical one).

11. Describe a time when you disagreed with a client. How did you handle it?

Interfacing with clients will probably be some part of your job so use this question to show that you can separate your entirely technical side from a more personable side.

Add Your Questions

What other questions have you been asked in machine learning or data science interviews? Or do you have other questions you like to ask candidates?

Share with the community in the comments below.

© 2019 Katy Medium


Submit a Comment

No comments yet.


This website uses cookies

As a user in the EEA, your approval is needed on a few things. To provide a better website experience, uses cookies (and other similar technologies) and may collect, process, and share personal data. Please choose which areas of our service you consent to our doing so.

For more information on managing or withdrawing consents and how we handle data, visit our Privacy Policy at:

Show Details
HubPages Device IDThis is used to identify particular browsers or devices when the access the service, and is used for security reasons.
LoginThis is necessary to sign in to the HubPages Service.
Google RecaptchaThis is used to prevent bots and spam. (Privacy Policy)
AkismetThis is used to detect comment spam. (Privacy Policy)
HubPages Google AnalyticsThis is used to provide data on traffic to our website, all personally identifyable data is anonymized. (Privacy Policy)
HubPages Traffic PixelThis is used to collect data on traffic to articles and other pages on our site. Unless you are signed in to a HubPages account, all personally identifiable information is anonymized.
Amazon Web ServicesThis is a cloud services platform that we used to host our service. (Privacy Policy)
CloudflareThis is a cloud CDN service that we use to efficiently deliver files required for our service to operate such as javascript, cascading style sheets, images, and videos. (Privacy Policy)
Google Hosted LibrariesJavascript software libraries such as jQuery are loaded at endpoints on the or domains, for performance and efficiency reasons. (Privacy Policy)
Google Custom SearchThis is feature allows you to search the site. (Privacy Policy)
Google MapsSome articles have Google Maps embedded in them. (Privacy Policy)
Google ChartsThis is used to display charts and graphs on articles and the author center. (Privacy Policy)
Google AdSense Host APIThis service allows you to sign up for or associate a Google AdSense account with HubPages, so that you can earn money from ads on your articles. No data is shared unless you engage with this feature. (Privacy Policy)
Google YouTubeSome articles have YouTube videos embedded in them. (Privacy Policy)
VimeoSome articles have Vimeo videos embedded in them. (Privacy Policy)
PaypalThis is used for a registered author who enrolls in the HubPages Earnings program and requests to be paid via PayPal. No data is shared with Paypal unless you engage with this feature. (Privacy Policy)
Facebook LoginYou can use this to streamline signing up for, or signing in to your Hubpages account. No data is shared with Facebook unless you engage with this feature. (Privacy Policy)
MavenThis supports the Maven widget and search functionality. (Privacy Policy)
Google AdSenseThis is an ad network. (Privacy Policy)
Google DoubleClickGoogle provides ad serving technology and runs an ad network. (Privacy Policy)
Index ExchangeThis is an ad network. (Privacy Policy)
SovrnThis is an ad network. (Privacy Policy)
Facebook AdsThis is an ad network. (Privacy Policy)
Amazon Unified Ad MarketplaceThis is an ad network. (Privacy Policy)
AppNexusThis is an ad network. (Privacy Policy)
OpenxThis is an ad network. (Privacy Policy)
Rubicon ProjectThis is an ad network. (Privacy Policy)
TripleLiftThis is an ad network. (Privacy Policy)
Say MediaWe partner with Say Media to deliver ad campaigns on our sites. (Privacy Policy)
Remarketing PixelsWe may use remarketing pixels from advertising networks such as Google AdWords, Bing Ads, and Facebook in order to advertise the HubPages Service to people that have visited our sites.
Conversion Tracking PixelsWe may use conversion tracking pixels from advertising networks such as Google AdWords, Bing Ads, and Facebook in order to identify when an advertisement has successfully resulted in the desired action, such as signing up for the HubPages Service or publishing an article on the HubPages Service.
Author Google AnalyticsThis is used to provide traffic data and reports to the authors of articles on the HubPages Service. (Privacy Policy)
ComscoreComScore is a media measurement and analytics company providing marketing data and analytics to enterprises, media and advertising agencies, and publishers. Non-consent will result in ComScore only processing obfuscated personal data. (Privacy Policy)
Amazon Tracking PixelSome articles display amazon products as part of the Amazon Affiliate program, this pixel provides traffic statistics for those products (Privacy Policy)
ClickscoThis is a data management platform studying reader behavior (Privacy Policy)