Live data from Hacker News

Amazon data science interview questions

mldatageek.herokuapp.com

41–50 of 95 posts

Re: Amazon data science interview questions

#41
post #30

It appears that the current generation of "hackers" seems very keen to work for a big name company-- Amazon, Apple, Microsoft, Google, Facebook. As someone who has worked for many startups and several of the above named companies, please let me give you a bit of advice: - A big company on your resume has no outside value to your prospects. Seriously. There's not "hey well he worked for amazon so we know he's good" fr…

My experience is completely different from yours in regards to every single point you make. Working at a big company (amazon) has increased my salary significantly, made me better technically, and noticeably made it easier for me to find a job elsewhere afterwards (this could be because my technical skill were better afterwards, and I had more experience). Additionally, I actually loved my team at Amazon. My manager…

I had a similar experience there. There were parts of the company that seemed like they sucked, but my experience was only positive and put me in a position to learn a ton from strong engineers while building my skills up and making a good amount of money. When I started, I made less than some of my friends who chose startups, but two years out of college I was making more than almost anybody I knew.

I might not have worked on my passion in specific there, but I had a great time, learned a ton, and IMO set myself up for a great trajectory in my career.

Like most other large companies, YMMV depending on where you're at.

Re: Amazon data science interview questions

#42

It appears that the current generation of "hackers" seems very keen to work for a big name company-- Amazon, Apple, Microsoft, Google, Facebook. As someone who has worked for many startups and several of the above named companies, please let me give you a bit of advice: - A big company on your resume has no outside value to your prospects. Seriously. There's not "hey well he worked for amazon so we know he's good" fr…

I used to be contacted by Amazon a lot around 4 years ago, to work with their data science team. At the time I was busy helping build up a startup (and a data science team), so always turned them down, I always put my people first. The startup turned out to be quite profitable, they are up and kicking nowadays, I am very proud of my time with them.

Nowadays I am looking for a new permanent position (have been freelancing for a couple of years). My wife happens to be a headhunter and knows how most HR and internal recruitment teams think and work. She tells me with Amazon in my CV many more doors would open. I don't regret turning them down, I know for sure had I accepted to work with them I would have never met my wife, who brings me more joy than any job would ever do... But I can't help to wonder...

Re: Amazon data science interview questions

#43
My quick and dirty answers are below. I'm thinking of moving jobs within the next year so I could use the practice. Can anyone do better?

> How do you treat colinearity?

Throw away the redundant part of the data

> How will you deal with unbalanced data where the ratio of negative and positive is huge?

This is very problem-dependent, but it's got the potential to wreak havoc with your learning algorithms. You might get seemingly good results by e.g. always predicting positive. Think carefully about your loss function.

> How will you decide whether a customer will buy a product today or not given the income of the customer, location where the customer lives, profession and gender? Define a machine learning algorithm for this.

This is a messy combination of continuous, categorical, and binary data. I'd encode the data in a vector [salary, x-y co-ords, one-hot encoding of profession, and binary indicator for gender]. Something like a random forest will probably get you most of the way there. Unusual professions could mess with the algorithm, so consider grouping by industry or averaging with a model that omits the profession data.

> Is it useful to apply PCA to your data before SVM classification?

Probably, but it could be data dependent. Semi-supervised learning often improves machine learning models, and it'll lower the dimensionality of your inputs, which will make training / hyperparameter search far more efficient.

> How do you compare a neural network that has one layer, one input and output to a logistic regression model?

Not entirely sure I understand the question, but a NN is basically just nested logistic regression, depending on the activation function.

> From a long sorted list and a short 4 element sorted list, which algorithm will you use to search the long sorted list for 4 elements.

To be honest, I'd use binary search and call it a day. I realise this isn't the answer you're looking for.

> How will inspect missing data and when are they important for your analysis?

You might try to impute the missing data from similar datapoints. Maybe use something like K nearest neighbours on the non-missing components to deduce the missing values. Got to be careful doing this though, since it could massively bias your analysis: consider using a special encoding for "missing data" too.

> Estimate the probability of a disease in a particular city given that the probability of the disease on a national level is low.

This is a tough one, since there are so many ways to answer it. I think I'd start by writing down a list of factors that might allow a high prevalence of the disease locally despite a low prevalence nationally. Weather? Local wildlife? Proximity to major transport hubs? Then I might suggest a simple model like naive Bayes.

Re: Amazon data science interview questions

#44

If you obtained a degree in Computer Science and specialized in Machine Learning are you suppose to be able to answer these questions? What job specialization is this aimed for? Almost strikes me more as a statistical based interview.

Classical AI is applied, layered logic.

Modern ML is applied, layered statistics.

season to taste.

Re: Amazon data science interview questions

#45

Earlier quoted context omitted.

As long as these riddles keep the web devs and infra engineers away from machine learning, I'm all for it. We must preserve the elite reputation associated with machine learning; not watered down by avergae engineers looking for a career change.

People have been doing statistics for decades, which is mostly all that machine learning is. Coming up with a fancy new buzz word for stuff that has been for decades, doesn't make something "elite".

Then why do machine learning scientists get paid multiples more than statisticians? Why do CS departments get far more funding for ML grants than the same grant branded from the statistics department?

Say what you want about ML vs statistics, the fact is: in both academia and industry, machine learning is far sexier than statistics.

Re: Amazon data science interview questions

#46
post #37

Earlier quoted context omitted.

Statistics and machine learning have a huge amount of overlap. Almost seems silly we separate the fields.

Well yes. Before the trendy buzzword, machine learning was known simply as predictive statistics.

No idea why this was downvoted; I find this to be an accurate description. The difference between stats and ML is mostly one of terminology and perspective. I studied math in college and grad school, and there were several moments in Andrew Ng's online lectures where I thought "oh, I know this, but we didn't call it that, and I had no idea it was considered ML."

Re: Amazon data science interview questions

#47

Earlier quoted context omitted.

It's quite rare to find folks in the industry with formal education in statistics. The folks that have it can run circles around everyone else, though. Data Science and Analytics and Machine Learning all use statistical theory when boiled down.

When I ran a Data Science team we primarily hired Physicists and Mathematics majors and not CS graduates for this reason. It mostly worked as intended (untapped source of excellent candidates), but some of them could not for the life of them pick up software development / writing manageable code with a team. They were so used to writing unmanageable scripts that didn't have long-term time horizons (think: horrors of…

Yeah, my experience is almost a perfect match. These days I'm wondering how a statistician can best capitalize long-term in tech?

Re: Amazon data science interview questions

#48
I respectfully disagree with everyone saying these are statistics. This is analytics. Most of them are down to earth and practical matters that I think would be lost on someone who did statistics as a math degree (but maybe this distinction is unclear because it is also observably different from straight comp sci or neural net expertise).

I recently graduated from a masters of business analytics program and would have humbly assumed that the breadth and depth of knowledge asked for in these questions would be beyond my capacity, but it was actually pretty spot on with what I had learned. Strictly speaking, I am far from an expert in statistics/math/comp sci. But these seem like reasonable questions. The best one is

"How will you decide whether a customer will buy a product today or not given the income of the customer, location where the customer lives, profession and gender? Define a machine learning algorithm for this."

This is a difficult question because for someone who has played with data science before, the answer seems to be obvious: throw the data into your favorite predictive algorithm and see the result (worst case: deep learning). What they are probably looking to see is a discussion of feature engineering, hypothetical exploratory analysis, and an effective way to present the answer (straight probabilities, weighted loss functions, outlier detection, etc.)

Re: Amazon data science interview questions

#49

My quick and dirty answers are below. I'm thinking of moving jobs within the next year so I could use the practice. Can anyone do better? > How do you treat colinearity? Throw away the redundant part of the data > How will you deal with unbalanced data where the ratio of negative and positive is huge? This is very problem-dependent, but it's got the potential to wreak havoc with your learning algorithms. You might ge…

I will try.

> How do you treat colinearity?

Use an LASSO as a feature selector or regularizer.

> How will you deal with unbalanced data where the ratio of negative and positive is huge?

User F1 score instead of accuracy as a performance metric. Try using cascade classifier.

> How will you decide whether a customer will buy a product today or not given the income of the customer, location where the customer lives, profession and gender? Define a machine learning algorithm for this.

More or less, the same as what you said.

> Is it useful to apply PCA to your data before SVM classification?

No, since kernel-SVM optimization is dependent on data (similarity) and not features. Also, we will be projecting the data into a basis expanded space anyways, so the dimensional reduction would be redundant.

> How do you compare a neural network that has one layer, one input and output to a logistic regression model?

An MLP-NN is the same as a logistic regressor, if all connections as 1-1 (no basis expansion), no activation function in the data-1st layer connection and Sigmoid as activation function in the 1st layer-output connection.

> From a long sorted list and a short 4 element sorted list, which algorithm will you use to search the long sorted list for 4 elements.

I am dreadfully bad at core CS questions...throw some AI questions at me. XD

> How will inspect missing data and when are they important for your analysis?

You might try to impute the missing data from similar datapoints. Maybe use something like K nearest neighbours on the non-missing components to deduce the missing values. Got to be careful doing this though, since it could massively bias your analysis: consider using a special encoding for "missing data" too.

Love your solutions. I might also try using cascade classifiers.

> Estimate the probability of a disease in a particular city given that the probability of the disease on a national level is low.

tough question. Would probably involve me asking a lot of questions about what data I have to play with. Very interview specific.

Re: Amazon data science interview questions

#50
post #15

If you obtained a degree in Computer Science and specialized in Machine Learning are you suppose to be able to answer these questions? What job specialization is this aimed for? Almost strikes me more as a statistical based interview.

I have the impression that at big universities maths is always the #1 topic in CS/ML. So its no surprise their graduates ask the same riddles as their profs.

I personally know a few ML professors at my university who are not taking any CS grads as pHDs. They only want people with maths degrees.

A lot of these CS professors are themselves maths grads.

Post reply on HN