Machine learning Interview Questions | Glassdoor

# Machine learning Interview Questions

"To get a job in machine learning, you must have the programming and mathematical knowledge to create artificial intelligence that is capable of learning new tasks without being explicitly coded. In an interview you may be asked about your experience with pertinent coding languages such as Java and C++ as well as with writing algorithms. The interview will be comprised mainly of technical questions that test your knowledge of the fundamental concepts of machine learning such as data mining and signal processing."

## Top Interview Questions

Sort: RelevancePopular Date

Jan 21, 2010
 Suppose you have a matrix of numbers. How can you easily compute the sum of any rectangle (i.e. a range [row_start, row_end, col_start, col_end]) of those numbers? How would you code this?8 AnswersIt can be done in constant time by precalculating sums of some basic rectangles (extending all the way to the border of the matrix). That precalculation times time O(n) by simple dynamic programming.Please elaborate, which "basic rectangles"? Are you recursively dividing each rectangle into 4 smaller rectangles? Precalc time for doing that is not O(n)?!?Compute the sum of the rectangles, for all i,j, bounded by (i,j), (i,m), (n,j), (n,m), where (n,m) is the size of the matrix M. Call that sum s(i,j). You can calculate s(i,j) by dynamic programming: s(i,j) = M(i,j) + s(i+1,j) + s(i,j+1) - s(i+1,j+1). And the sum of any rectangle can be computed from s(i,j).Show More ResponsesAwesome!!The answer is already popular in computer vision fields!! It is called integral imaging. See this page http://en.wikipedia.org/wiki/Haar-like_featuresLet a[][] be the 2d array, int i=0; for( j = row_start; j <= row_end; j++) for( k = col_start; k <= col_end; k++) i+=a[j][k];Iterate over matrix as an array storing (new sums array) in each position the cumulative sum up to that point. For each row in the desired submatrix we can compute its sum as a difference between its end and start positions. Repeat for other rows. Add up all the row sums. One or more comments have been removed. Please see our Community Guidelines or Terms of Service for more information.

### Computer Vision/Machine Learning Software Engineer at Gauss Surgical was asked...

Jun 17, 2014
 Why does one use MSE as a measure of quality. What is the scientific/mathematical reason for the same?3 AnswersMean-Square error is an error metric for measuring image or video quality it is popular video and image quality metric because the analysis and mathematics is easier with this L2-Norm metric. Most video and image quality experts will agree that MSE is not a very good measure of perceptual video and image quality.The mathematical reasoning behind the MSE is as follows: For any real applications, noise in the readings or the labels is inevitable. We generally assume this noise follows Gaussian distribution and this holds perfectly well for most of the real applications. Considering 'e' follows gaussian distribution in y=f(x) + e and calculating the MLE, we get MSE which is also L2 distance. Note: Assuming some other noise distribution may lead to other MLE estimate which will not be MSE.MSE is used for understanding the weight of the errors in any model. This helps us understand model accuracy in a way that is helpful when choosing different types of models. Check out more answers on InterviewQuery.com

Dec 29, 2010
 How would you design a recommendation system (like amazon)?2 AnswersUse collaborate filtering to compare personal preference with others. If A and B are similar, we can recommend preferred items in B to A.Why downvote on other answer? He/she is right. Collaborative filtering is the most common strategy for recommendation systems. You see user A buys these things and user B also bought those things but user B bought this other thing too so let's show that thing to User A.

### Data Scientist & Machine Learning at Amazon was asked...

Oct 18, 2013
 The three data structure questions are: 1. the difference between linked list and array; 2. the difference between stack and queue; 3. describe hash table.1 AnswerWow... pathetically easy

### Machine Learning Engineer at PathAI was asked...

Apr 20, 2018
 Have you ever had your code formally verified?6 AnswersWhat were the online coding questions like? Could you elaborate?Object detection. Is that what yours was?Object detection. Is that what yours was?Show More Responsesit is same as mine. Could you give me more details about the online coding? what algorithm did they test on object detection part?Did you complete it? If yes, what were the algorithms like?Could you tell me the onsite details? Many thanks!

### Machine Learning Scientist at PathAI was asked...

Feb 21, 2020
 Probability, conventional machine learning, deep learning, coding/algorithm, behavioral 3 AnswersI was good with most of the questionsCan you share how coding round was? what type of questions were asked?Can you share what they asked in the coding round?

Jun 18, 2018
 Given an infinite chessboard, find shortest distance for a knight to move from position A to position B2 AnswersBFS. That's it! Yet I screwed up due to lack of practice.You can use run 2 BFSs at the same time. Start from source and dest and keep repeating until there is an intersection. You can also limit the search space to the first quadrant. Since knights in chess moves are symmetrical across all 4 quadrants (imagine 0,0 at the center of the chess board).

### Machine Learning Engineer at Barracuda Networks was asked...

Mar 7, 2017
 Questions were all about the different machine learning algorithm, like MLP, SVM, kNN, CNN, and ... The interviewer was interesting to know how I implemented the algorithms, what type of data set (numerical or text-based) data that I used, and the accuracy that I obtained. It was no routine software engineering question about the data structures, algorithms, or programming languages at all. It was a very straightforward interview, low stressful, and friendly interview, all based on my own resume. 2 AnswersI answered questions very well because the questions were more asking about the projects that I had already done.Can you please update with the the next step after technical phone call?