The world’s leading publication for data science, AI, and ML professionals.

Interview Series Part I: Use these tips to pass Technical Data Science Interviews!

Machine Learning/DataScience Interview Series – Technical Interview

I am writing this blog post series to share my journey what I learned when applying for Data Scientist/Machine Learning Engineer and interviewing positions at different companies. It was almost 5 years that I had applied for a job, and things have changed dramatically since I gave my last interview. There have been massive changes in the industry. It felt a little like uncharted territory but eventually, I got the hang of the overall process. I learned a lot of new things and had a lot of fun talking with experts in different industry domains where Machine Learning is applied.

I am going to talk about my Technical Interview experience specifically in this post.

Photo by Christina @ wocintechchat.com on Unsplash
Photo by Christina @ wocintechchat.com on Unsplash

Technical discussions in Data Science/Machine Learning can be tricky to "predict" sometimes 😉 . Technical interviews will mainly depend on the job description and the required experience. The spectrum of questions that can come up can be from a wide range. However, the employer’s goal in most of the positions is always to learn that the candidate knows the basics of a specific theory or application. No one will ask to derive/write the algorithm from scratch! But they would love to understand where, why, and when to use a specific technique or algorithm.

The total rounds of the interview and time duration can vary based from company to company. Mostly there can be 3–4 rounds and each lasting to a maximum of about an hour. I think interviews can likely be divided into mainly 3 different categories based on the several interviews I gave:

  1. Exploring your resume/experience
  2. Machine Learning & Statistics Questions
  3. Coding Challenge

👉 I. Exploring your resume/experience:

Photo by Markus Winkler on Unsplash
Photo by Markus Winkler on Unsplash

Every interviewer will briefly touch upon your resume, maybe not for the entire hour but 5–7 minutes. Talking about past work and experience can be easily tackled. You do not need to invest a lot of time in preparation unless you think a specific area of your resume is of too much emphasis in the job you are applying for. There are various things that I would like to share that I have experienced and break down in sub-sections:

  1. An interviewer might ask to explain about any of your projects:

Try to prepare one of the projects you love the most or have worked on very closely. Explain the entire project end to end in an organizing manner. You must explain in a sequential way which shows how organized you are. Being unorganized can confuse the interviewer, and it might cost you some negative points. I usually try to break into sections if I am explaining any of the projects from end-to-end:

  • Data source/collection
  • Data format
  • Cleaning
  • Exploration
  • Modeling
  • Evaluation
  • Productionization

Try to be brief and explain in 4–5 minutes max. Making it either too concise or too elongated might not give a good impression. If the interviewer is interested in any specific topic, they will go into detail relating to the responsibilities in the job description. So make sure you’re thorough with it! You can always ask the interviewer if you would like to explain something in detail.

  1. An interviewer’s interest-based project:

The interviewer may ask you to talk through a project that might be of their interest or relevant to the job you have applied for. The answer can be similar to the top question. But in some of your mentioned projects, you might have contributed to a less extent than other projects. However, you must be thorough with each and every project and your contribution to that! Mentioning it in the resume and having difficulty to explain can raise a red flag to the employer.

  1. Tools/Technologies:

You might have mentioned some packages that you are familiar with, methods, tools, cloud environments like Azure, AWS, or GCP. Be ready to explain in detail what things you are familiar with them. Of course, you are going to build that sort of profile over a period of time with more work but starting and trying to become an all-rounder in multiple things can bag you high points! Diverse Data Scientist/MachineLearning engineers are preferred as opposed to candidates who only have experience in a narrow area.

  1. Transition into Data Science:

Data Science/Machine Learning is a unique area, and people from diverse backgrounds have made transitions into them. It is no surprise that subject experts can understand the data of their areas better than anyone else. However, it might generate curiosity in some employers; Why Data Science? or How did you start your career in Data Science? Have a good answer ready for that. Don’t just say – "It was booming, so I got into it" or, "I thought to try it out". NO! Remember every answer you give to the employer convinces and brings you closer to the finish line. Have a great solution ready!

Make sure you only write in your resume what you have done or know. Don’t bluff!


👉 II. ML & Stats Questions:

Photo by Hitesh Choudhary on Unsplash
Photo by Hitesh Choudhary on Unsplash

Machine Learning and Statistical questions are an integral part of the Interview. It is a broad umbrella and a variety of questions can come up!

Algorithms & Statistical Questions: Questions based on algorithms can be very diverse. As I mentioned before, they will assess your theoretical as well as application knowledge for a problem. The interviewer may ask how the algorithm works but will not ask you to derive it from scratch. Some of the questions that I have faced are like:

  • What is the difference between XGBoost and LightGBM? What is the working like? Which one is better and why?
  • What is regularization? Why is it needed?
  • Difference between L1 and L2 regularization? Which one is better?
  • What is the difference between tree-based and gradient boosting methods?
  • What are the assumptions of Linear Regression?
  • What is a bias-variance trade-off?
  • What is t-test, normal distribution, etc?
  • How will the mean and median change depending on a new data point added to the dataset?

There are a wide variety of resources available if you want to have a list of questions that can be asked.

Metrics: It is essential to know and understand commonly used metrics in regression, classification, or time-series kinds of problems. E.g. when it comes to classification problems, they might ask:

  • What is a confusion matrix?
  • When should you be using precision, recall, or F1 score?
  • What are better metrics to use when the class of the dataset is highly imbalanced?
  • Why would you use a specific type of metric?

These are fundamental questions and an interview would generally cover such types of questions. There are varieties of resources I would like to mention here which I liked:

  1. https://elitedatascience.com/machine-learning-interview-questions-answers
  2. https://www.simplilearn.com/tutorials/machine-learning-tutorial/machine-learning-interview-questions
  3. Jay has a youtube channel and ample of good tips: https://www.youtube.com/channel/UCcQx1UnmorvmSEZef4X7-6g

👉 III. Coding Challenge:

Photo by Danial Igdery on Unsplash
Photo by Danial Igdery on Unsplash

The coding challenge can be based mainly on Python or SQL languages. Some organizations might be heavily using SQL so they will be strict on conducting tests based on SQL. However, there are 2 different ways in which coding challenges can proceed that I have experienced so far. Either can happen or, in some cases, both of them. To name them, they are:

  1. On Coding Platform with time limit: There are several platforms like CodeSignal, HackerRank, etc. where employers can ask a fixed set of questions to complete in a specific time interval. The questions are simple and explained in detail. Examples are provided in some cases. The questions can be a simple problem requirement to test your logical skills and approach to the problem.
  • Write a program to get a total of all the prime numbers for a specified range.
  • Write a program to count 2 digit even numbers.
  1. Coding with Interviewer: If you are going to code with the interviewer, it will be very interactive. It is advisable to explain your logic or your thought process. If you are stuck, the interviewer will usually try to make your job easy by providing hints and by providing warnings wherever necessary. Do not think that you need to write functional code! That is a false impression of this sort of interview. As I mentioned before, the interviewer will be like your friend and only assess how you are approaching the problem, if you can write a code in a very simple way and is clean enough. Efficiency is appreciated but might not be necessary considering the time crunch! I have seen coderpad.io as usually the favorite program, but it can vary based on the organization or the interviewer’s choice.

In some interviews, the interviewer will provide you with the dataset. He will ask questions and expect you to perform operations on data to provide solutions to the interviewer. It might be just running through a hypothetical situation or problem similar to what is being used internally in the organization.

Tips:

  • Read/understand the questions before jumping directly to solve them. It might be too late before you realize that the expected result was something different.
  • Do not work on making your code efficient right off the bat! Try to pass through all the test cases. The goal is to see if you can write a program quickly that works!
  • It is ok if you cannot complete all the challenges. Try attempting all of them starting with a tough one. Even if you write a decent code and show that you can write code, it gives a good impression!

Finally, I would like to say that never give up! Keep working hard, give interviews and have faith in yourself. You will get into your favorite Data Science position. I hope these tips will help you in your job search! More to come.. Stay Tuned!

Follow me on Twitter or LinkedIn. You may also reach out to me via [email protected]


Please sign up for a membership if you want to become a Medium member and enjoy reading articles without any limits. Medium will share a portion with me for any members who sign up using the above link! Thanks.


Related Articles