Machine Learning Problems
Source: Problem prompts adapted from Ace the Data Science Interview — Chapter 7 (“Machine Learning”) Medium set (Huo & Singh). Model answers, explanations, and charts here are original for this course.
Using “partial dependence”, explain:
You're running a binary classification loan model, and rejected applicants must be told why they were rejected. Without digging into feature weights, how would you supply these reasons?
Minimum 15 words. Your answer must include: “partial dependence”.
Meet the writing requirements, then you can open the model answer.
Using “embeddings”, explain:
Given a very large corpus of words, how would you identify synonyms?
Minimum 15 words. Your answer must include: “embeddings”.
Meet the writing requirements, then you can open the model answer.
Using “bias” and “variance”, explain:
What is the bias-variance trade-off? How is it expressed using an equation?
Minimum 20 words. Your answer must include: “bias”, “variance”.
Meet the writing requirements, then you can open the model answer.
Using “fold”, explain:
Define the cross-validation process. What is the motivation behind using it?
Minimum 15 words. Your answer must include: “fold”.
Meet the writing requirements, then you can open the model answer.
Using “features”, explain:
How would you build a lead-scoring algorithm to predict whether a prospective company is likely to convert into an enterprise customer?
Minimum 20 words. Your answer must include: “features”.
Meet the writing requirements, then you can open the model answer.
Using “collaborative filtering”, explain:
How would you approach creating a music recommendation algorithm?
Minimum 20 words. Your answer must include: “collaborative filtering”.
Meet the writing requirements, then you can open the model answer.
Using “local minimum”, explain:
Define what it means for a function to be convex. Give an example of a machine learning algorithm whose objective is not convex, and explain why.
Minimum 15 words. Your answer must include: “local minimum”.
Meet the writing requirements, then you can open the model answer.
You have 10 examples split evenly into two classes (5 of label a, 5 of label b). Splitting on an attribute X puts 6 examples into the X=1 branch (5 a's, 1 b) and 4 examples into the X=0 branch (0 a's, 4 b's). What is the information gain IG(X,Y)=H(Y)−H(Y∣X) of this split?
Enter a number (at most 2 decimal places).
Using “sparse”, explain:
What is L1 and L2 regularization? What are the differences between the two?
Minimum 15 words. Your answer must include: “sparse”.
Meet the writing requirements, then you can open the model answer.
Using “stochastic”, explain:
Describe gradient descent and the motivation behind stochastic gradient descent.
Minimum 15 words. Your answer must include: “stochastic”.
Meet the writing requirements, then you can open the model answer.
Using “monotonic”, explain:
A fraud classifier scores each application between 0 and 1. If you take the square root of every score, how does the ROC curve change? If it doesn't change, what kinds of transforms would change it?
Minimum 15 words. Your answer must include: “monotonic”.
Meet the writing requirements, then you can open the model answer.
Using “Gaussian”, explain:
If X is a univariate Gaussian random variable, what is the entropy of X?
Minimum 4 words. Your answer must include: “Gaussian”.
Meet the writing requirements, then you can open the model answer.
Using H(X)=21+log(σ2π) (natural log, in nats) for a Gaussian, what is the entropy of a standard normal X∼N(0,1)?
Enter a number (at most 2 decimal places).
Using “propensity”, explain:
How would you build a model to calculate a customer's propensity to buy a particular item? What are some pros and cons of your approach?
Minimum 15 words. Your answer must include: “propensity”.
Meet the writing requirements, then you can open the model answer.
Using “generative” and “discriminative”, explain:
Compare and contrast Gaussian Naive Bayes (GNB) and logistic regression. When would you use one over the other?
Minimum 20 words. Your answer must include: “generative”, “discriminative”.
Meet the writing requirements, then you can open the model answer.