Docsity

CS5785 Applied Machine Learning - Practice Prelim, Exams of Machine Learning

Toggle sidebar
bg1
CS5785 Applied Machine Learning - Practice Prelim
October, 2021 (75 minutes)
Name: NetID:
• This exam is closed book.
• There should be in total 8 numbered pages in this exam (including this cover sheet). The last 2 pages are
used for scratch paper.
• There are 5 questions worth a total of 100 points. Work efficiently. Carefully manage your time to focus
on the easier questions first, and avoid getting stuck in the more difficult ones before you have answered
the easier ones.
• You have 75 minutes. Good luck!
Question Topic Max. Score Score
1 Short questions 30
2 Probability and MLE 16
3 Performance curves 20
4 Bayes’s law 20
5 Naïve Bayes with Bag-of-Words 14
Total 100
pf3
pf4
pf5
pf8

Partial preview of the text

Download CS5785 Applied Machine Learning - Practice Prelim and more Exams Machine Learning in PDF only on Docsity!

CS5785 Applied Machine Learning - Practice Prelim

October, 2021 (75 minutes)

Name: NetID:

  • This exam is closed book.
  • There should be in total 8 numbered pages in this exam (including this cover sheet). The last 2 pages are used for scratch paper.
  • There are 5 questions worth a total of 100 points. Work efficiently. Carefully manage your time to focus on the easier questions first, and avoid getting stuck in the more difficult ones before you have answered the easier ones.
  • You have 75 minutes. Good luck!

Question Topic Max. Score Score

1 Short questions 30

2 Probability and MLE 16

3 Performance curves 20

4 Bayes’s law 20

5 Naïve Bayes with Bag-of-Words 14

Total 100

1 SHORT QUESTIONS (30PT )

(a) (2pt) Each time we train K-Means on the same dataset, we will get the same clustering no matter the starting conditions. True or False?

(b) (2pt) Linear Discriminant Analysis assumes that the class conditioned densities are Gaussian with the same covariance matrix. True or False?

(c) (2pt) K-means will terminate after a finite number of steps, no matter the input. True or False?

(d) (2pt) KNN is an example of supervised learning method. True or False?

(e) (2pt) Each time we run K-means on the same dataset, we will get the same clustering no matter the starting conditions. True or False?

(f) (2pt) List three methods commonly used for handling overfitting:

.

(g) (2pt) Suppose X ∈ R n × d^ is a dataset with n = 1000 images as d = (16 × 16)-dimensional row vectors. This means Xi j is the brightness level between 0 and 255 of pixel j in image i. Let X = U Σ V T^ be the singular value decomposition of X. Are all entries of V nonnegative? Yes or No?

(h) (2pt) Naive Bayes assumes that all the features are independent given the class label. True or False?

(i) (2pt) A Kaggle competition typically has two different test sets. One set is used to score the public leader- board during the competition. The other set is used to create a private leaderboard after the competition ends. One team repeatedly submits their method on the public set, making small changes each time until they achieve first place on the public leaderboard. When the competition ends, teams are re-scored on the private set. The team finds they have dropped to 102nd^ place. What happened? Please describe.

For each of the listed descriptions below, choose whether the experimental set up is ok or problematic. If you think it is problematic, briefly state what the problems are:

(j) (4pt) A team is building a 10-class digit classifier. They’re trying out a new method of cross-validation. In- stead of choosing the folds randomly, they constrain each fold to contain only a single digit class. Ok or Prob- lematic?

(k) (4pt) A team is using k -nearest neighbor to classify birds. They use 10-fold cross validation to pick the k that maximizes the average validation accuracy. Ok or Problematic?

(l) (4pt) Suppose an intern at Google is trying to build a better spam classifier. They believe their model is good because every spam message in their test set was caught and correctly classified as spam. Ok or Problem- atic?

3 PERFORMANCE CURVES (20PT )

On the left is a two-class testing dataset with 20 points, ten of one class and ten of the other. The red + are consid- ered as positvies while the blue × are negatives. We fit a Logistic Regression classifier on another training dataset and are plotting the decision boundaries at five different classification thresholds.

True positive rate

False positive rate

(a) (8pt) For each of the five thresholds, draw a point for the true positive rate and the false positive rate on the right graph. Please be exact and label each point with its TPR and FPR. (To help you, there are exactly 20 grid lines in the graph.)

(b) (3pt) Connect the dots. What is this graph called? (Acronym is ok.)

(c) (3pt) Suppose this is a spam email classifier. The red + are the spam class and the blue × are the non-spam class. It’s very bad to send a legitimate email to the spam folder. Which threshold would you pick? Please explain why.

(d) (3pt) Now suppose this is a model that detects cancer. The red + represent patients with cancer and the blue × are the patients that do not have cancer. Patients flagged by this model are sent through additional expensive tests. It’s better to flag a healthy patient as cancerous than it is to miss a cancer case. Which threshold would you pick? Please explain why.

(e) (3pt) Someone from another team created a model with the following rates: at FPR=0.3, TPR=0.2; at FPR=0.5, TPR=0.6; at FPR=0.9, TPR=0.85. Which model is better: theirs or ours? Please explain.

4 BAYES’S LAW (20PT )

A Cornell Tech student invites you to be part of her enterprising startup, “PeachPiper,” providing consulting ser- vices to farmers. That target clientele are farmers growing premium free range artisan peaches. Each peach sells at a profit of $. However, one in every ten thousand peaches is infested with bugs and at present no solution is available to detect these bad peaches before selling them. If any customer ends up eating one of these, it will cost the farmer $ on average in bad publicity and lawsuits. Yuck! PeachPiper’s value proposition is a machine learning model that decides whether a peach is infested or not before it is sold. 99% of rotten peaches are detected as rotten, and 98% of good peaches are detected as good. PeachPiper runs on a peaches-as-a-Service model and charges $0.05 per peach per test.

(Hint: Bayes’s Law: P ( A | B ) =

P ( A , B )

P ( B )

P ( B | A ) P ( A )

P ( B )

(a) ( 7 pts. ) What is the probability that a peach marked bad by PeachPiper’s model is actually bad?

(b) ( 7 pts. ) How much profit per peach can an artisinal peach farmer expect if they don’t use the service?

(c) ( 6 pts. ) How much profit per peach can an artisinal peach farmer expect if they do use the service?