ML Week7 Soln
ML Week7 Soln
Week 7
Prof. B. Ravindran, IIT Madras
1
(a) Precision: 0.81, Recall: 0.85, Accuracy: 0.83
(b) Precision: 0.85, Recall: 0.81, Accuracy: 0.85
(c) Precision: 0.80, Recall: 0.85, Accuracy: 0.82
(d) Precision: 0.85, Recall: 0.85, Accuracy: 0.80
Sol. (a) -
Precision = T PT+F
P 85 85
P = 85+20 = 105 ≈ 0.81
Recall = T PT+F
P 85 85
N = 85+15 = 100 = 0.85
Accuracy = T P +T N +F P +F N = 85+80
T P +T N 165
200 = 200 = 0.825 ≈ 0.83
5. (1 Mark) AUC for your newly trained model is 0.5. Is your model prediction completely
random?
(a) Yes
(b) No
(c) ROC curve is needed to derive this conclusion
(d) Cannot be determined even with ROC
Sol. (c) - An AUC of 0.5 suggests that the model is either making random predictions,
predicting all instances as a single class, or making systematically incorrect predictions that
could be corrected by inverting its outputs.
6. (1 Mark) You are building a model to detect cancer. Which metric will you prefer for evaluating
your model?
(a) Accuracy
(b) Sensitivity
(c) Specificity
(d) MSE
Sol. (b) - In medical application, FP is the most important (which sensitivity captures)
7. (1 Mark) You have 2 binary classifiers A and B. A has accuracy=0% and B has accuracy=50%.
Which classifier is more useful?
(a) A
(b) B
(c) Both are good
(d) Cannot say
Sol. (a) - Flip the labels and get 100% accuracy!
8. (1 Mark) You have a special case where your data has 10 classes and is sorted according to
target labels. You attempt 5-fold cross validation by selecting the folds sequentially. What
can you say about your resulting model?
2
(a) It will have 100% accuracy.
(b) It will have 0% accuracy.
(c) It will have close to perfect accuracy.
(d) Accuracy will depend on the compute power available for training.
Sol. (b) - The training and test sets are partitioned in a way that some classes are only
present in the test set. This means the classifier will never learn about these classes and
therefore cannot predict them