Software engineer machine learning sollicitatievragen
360
Sollicitatievragen voor Software Engineer Machine Learning gedeeld door sollicitantenMeest gestelde sollicitatievragen

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?
7 antwoorden↳
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). Minder
↳
Awesome!!
↳
The answer is already popular in computer vision fields!! It is called integral imaging. See this page http://en.wikipedia.org/wiki/Haar-like_features Minder

Why does one use MSE as a measure of quality. What is the scientific/mathematical reason for the same?
3 antwoorden↳
Mean-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. Minder
↳
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. Minder
↳
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 Minder

Please code up and send me a function that takes two integer arrays and returns their intersection. This answer must take less than n^2 time.
3 antwoorden↳
Use a hash table or tree.
↳
modify merge sort
↳
sample outline of O(n log n) algorithm : a.sort(); b.sort(); list c={}; int i1=0,i2=0; while(true) { if(i1==n || i2==n) break; if(a[i1]==b[i2]) { c.insert(a[i1]); i1++; i2++; }else { if(a[i1] < b[i2]) i1++; else i2++; } } return c; Minder

What is your instructional design process?
2 antwoorden↳
They asked me this question multiple times.
↳
Exactly! LOL. It was so abstract, I couldn't answer it! The ISD process is looooonnnnnngggggg. We do a lot of stuff to design and develop great content. People don't realize how hard we work. Minder

what are python generators?
2 antwoorden↳
USER_ID_LIST=[1,2,3,4,5,6,7,8,9] def get_user_ids(): for id in USER_ID_LIST: yield id if __name__ == "__main__": user_ids = get_user_ids() print("First Loop") for user_id in user_ids: print(user_id) if user_id == 5: break print("Second Loop") for user_id in user_ids: print(user_id) ------output----- First Loop 1 2 3 4 5 Second Loop 6 7 8 9 Minder
↳
Generator functions allow you to declare a function that behaves like an iterator. Generators introduce the yield statement to Python. It works a bit like return because it returns a value. The difference is that it saves the state of the function. The next time the function is called, execution continues from where it left off, with the same variable values it had before yielding. USER_ID_LIST=[1,2,3,4,5,6,7,8,9] def get_user_ids(): for id in USER_ID_LIST: yield id if __name__ == "__main__": user_ids = get_user_ids() print("First Loop") for user_id in user_ids: print(user_id) if user_id == 5: break print("Second Loop") for user_id in user_ids: print(user_id) Minder

Implement a sampling function with nominal distribution.
2 antwoorden↳
I think you mean Normal distribution! If you are using R use set.seed(). You can then use rnorm() with size, mean & SD. e.g. >set.seed(123) >rnorm(100, 2, 5) Minder
↳
I'm the original poster, sorry for my typo. I actually mean multinomial distribution. And the advanced question was, if the probability is a skewed distribution, how would you speed up your algorithm. You can find both answer from Wikipedia. :) Minder

Cant disclose due to NDA.
2 antwoorden↳
... when Glassdoor asks you for info like interview questions you can just not answer. Minder
↳
Step by step whiteboard code writing.

What are your projects relevant to this job position?
1 antwoorden↳
explain any machine learning, deep learning projects or experience

Tell me something I cannot find in your resume.
1 antwoorden↳
I expressed my interests and hobbies outside of work.

Coding question: Given a 2d grid map of '1's (land) and '0's (water), count the number of islands. An island is surrounded by water and is formed by connecting adjacent lands horizontally or vertically. You may assume all four edges of the grid are all surrounded by water
1 antwoorden↳
A typical question which can be solved using either DFS or BFS approach For BFS approach: if detect a land, enlarge until reach the edge, then mark the 1 to 0, using this approach will make problem pretty trivial to solve. Minder