0% found this document useful (0 votes)
10 views3 pages

ML Week7 Soln

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views3 pages

ML Week7 Soln

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

Introduction to Machine Learning

Week 7
Prof. B. Ravindran, IIT Madras

1. (1 Mark) Define active learning:


(a) A learning approach where the algorithm passively receives all training data at once
(b) A technique where the model learns from its own predictions without human intervention
(c) An iterative learning process where the model selects the most informative data points
for labeling
(d) A method where the model randomly selects data points for training to reduce bias
Sol. (c) - Refer to the lectures
2. (2 Mark) Given 100 distinct data points, if you sample 100 times with replacement, what is
the expected number of distinct points you will obtain?
(a) Approximately 50
(b) Approximately 63
(c) Exactly 100
(d) Approximately 37
Sol. (b) -
99 100
Probability of not selecting a point in 100 tries = 100
99 100
Probability of selecting a point atleast once in 100 tries = 1 - 100
99 100
P
Expectation = x × P (x) = 100(1 − ( 100 ) ) ≈ 63
3. (1 Mark) What is the key difference between bootstrapping and cross-validation?
(a) Bootstrapping uses the entire dataset for training, while cross-validation splits the data
into subsets
(b) Cross-validation allows replacement, while bootstrapping does not
(c) Bootstrapping creates multiple samples with replacement, while cross-validation creates
subsets without replacement
(d) Cross-validation is used for model selection, while bootstrapping is only used for uncer-
tainty estimation
Sol. (c) - Refer to the lectures
4. (2 Marks) Consider the following confusion matrix for a binary classification problem:

Predicted Positive Predicted Negative


Actual Positive 85 15
Actual Negative 20 80

What are the precision, recall, and accuracy of this classifier?

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

You might also like