↳
What was the question?
↳
Thnk god i saw this, i have also been told the same
↳
I asked a few follow-up questions and I asked what is the end of the line character, as I did not remember it!, then I solved with a hasmap and going over the string. The question with no means was a good question to evaluate the coding skills of someone. Less
↳
I would learn character level embedding and pass them through a shallow neural network (assuming the number of characters in the string is small). The output layer would be tanh layer (squashes number in [-1, 1] range. I would use the output to a fixed size hash, where ith bit value would be 0 if activation is negative and 1 if activation is positive. Try checking Random Projection Algorithm used for Locality Sensitive Hashing idea Less
↳
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 Less
↳
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) Less
↳
If we are developing an iterative model (e.g. gradient boosting or NNs), then we can use a test set to validate each iteration and update the weights accordingly. After running through all iterations, we want to test how our final model performs on a held-out dataset -- the validation dataset. Note that terminology "test" and "validation" is often used interchangeably Less
↳
Asked to only spend 3 hours on it, and even after my best efforts I spent 4 and couldn't meet their expectations. Instead I tried to tackle the problem as I would in production: small incremental value gains. I also challenged the problem itself given the data (again, as I would in a production setting to set expectations about what we can realistically build). I was told I didn't do enough in the project to solve the problem they asked. Again, impossible to do in 3 hours and secondly, I fundamentally disagreed with the expectation that the problem can be "solved". Another note: the reviewer didn't look at my project before the interview. I understand things come up but if I'm expected to take my own time to do the work, the least I can expect is preparation on the other side. So my two main issues: 1. asking for proof that a Senior candidate knows how to build a classifier on text data (I wouldn't have 8+ years in the field if I can't do that) 2. not engaging in the larger (and frankly, more important, conversation that your senior people should be having about how to build reliable and trustworthy models) Less
↳
Study like crazy, especially in areas that you're not strongest on. For example my list included system design for a MLE position. That wasn't my strength so I took an online class on system design for software engineers. While not directly applicable to ML the pattern of approaching problems, clarifying (often intentional) ambiguity, and different runtime scenarios, helped me massively in one of the sessions. Even if I hadn't gotten an offer it would still be good learning for ones career. Also intentionally practice answering leadership principal questions, which you can find online. It will feel weird, do it anyways and do it for many questions. You may come off as too smooth or prepared, but that's still much preferred to tanking your interviews as you must pass LPs to get an offer. Almost no one can stroll into an Amazon MLE interview and do well. If you have a strong background and you prepare then you've got a shot. If you wing it... Less
↳
I felt team interviews were friendly enough that I could disclose things that were not my expertise. Less
↳
Tried answering via the coordinate geometry approach instead of using max. The interviewer was very kind and helped me towards getting the solution. I spent too much time and could not finish it within the given 40 min. Less