Module 4
Sl No Question Mar Text Book & Chapte Exercise Page No.
ks its Author r No. No.
1. Define Accuracy, Precision, Recall, and 2 Course Study
F1-Score. Also write their mathematical Materials
formulae.
2. What is the Confusion Matrix? 2 Course Study
Materials
3. What is the need for confusion matrix? 2 Course Study
Materials
4. What is the purpose of a Cost Function? 2 Course Study
Materials
5. How does Naive Bayes work? 2 Course Study
Materials
6. Explain Support Vector Machines 2 Course Study
(SVM). Materials
7. What is Logistic Regression? 2 Course Study
Materials
8. What is the purpose of a Cost Function? 2 Course Study
Materials
9. What is the ‘training Set’ and ‘test Set’ in 2 Course Study
a Machine Learning Model? Materials
10. How Much Data Will You Allocate for 2 Course Study
your training and test sets? Materials
11. How false positive and false negative are 2 Course Study
significant in finding the accuracy of a Materials
classifier?
12. In business problems, when will you use 2 Course Study
classification over regression? Materials
13. Explain the workflow and derive the cost 2 Course Study
function for a linear regression Materials
hypothesis.
14. Why a classification hypothesis is termed 2 Course Study
“logistic regression”? Explain with proper Materials
mathematical expressions.
15. Define the parameters, true positive, true 2 Course Study
negative, false positive and false negative, Materials
in the context of a confusion matrix with
a suitable real-life example.
16. How many types of cross-validation 2 Course Study
techniques exist in machine learning? Materials
Explain with a proper set of examples.
17. Write down the formula of Manhatten 2 Course Study
distance and explain the terms. Materials
18. How does decision tree help in decision 2 Course Study
making? Materials
19. How Does the K-Nearest Neighbors 2 Course Study
Algorithm Work? Materials
20. List down the merits and demerits of 2 Course Study
KNN algorithm. Materials
21. The R2-scores for two specific databases 2 Course Study
1|Page
Module 4
are given as 0.2 and 0.95. Which value Materials
indicates a reasonably strong relationship
between an independent variable (X) and
a dependent variable (Y)?
22. Provide real-life example to explain 2 Course Study
supervised learning, specifically the Materials
regression problem and correlate with
independent and dependent variable.
23. Provide real-life example to explain the 2 Course Study
classification problem and correlate with Materials
independent and dependent variable.
24. Write down the “Normal Equation” to 2 Course Study
compute the linear regression Materials
coefficients.
25. Consider hypothesis as hθ(x)=1+(tumor 2 Course Study
size)*θ1≡ θ0+θ1x, where θ0=1 and θ1 = Materials
tumor size. If hθ(x)=70%, then comment
on the decision obtained in the
hypothesis.
26. Consider the following dataset with θ0 = 5 ‘Machine Chapter 152
2.4 and θ1 = 0.4. Learning’ – by 4
x y Aurelien Geron
1 3 (O’Reilly, SPD,
2 4 3rded, 2022)
3 2
4 4
5 5
Find out the regression hypothesis, hθ(x).
27. Suppose you are using Polynomial 5 ‘Machine Chapter 174
Regression. You plot the learning curves Learning’ – by 4
and Aurelien Geron
you notice that there is a large gap (O’Reilly, SPD,
between the training error and the 3rded, 2022)
validation
error. What is happening? What are three
ways to solve this?
28. What Linear Regression training 5 ‘Machine Chapter 173
algorithm can you use if you have a Learning’ – by 4
training set with millions of features? Aurelien Geron
(O’Reilly, SPD,
3rded, 2022)
29. In basket analysis, we want to find the 5 ‘Introduction to Chapter 19
dependence between two items X and Y. Machine 1
Given a database of customer Learning’ - by
transactions, how can we find these Ethem
dependencies? How would we generalize Alpaydin
this to more than two items? (MIT Press and
PHI, 3rd ed,
2014)
30. What is the hinge loss function used in 5 ‘Machine Chapter 174
2|Page
Module 4
Support Vector Machines? What are the Learning’ – by 5
main hyper-parameters of an SVM Aurelien Geron
classifier? (O’Reilly, SPD,
3rded, 2022)
31. What is the fundamental idea behind 5 ‘Machine Chapter 193
Support Vector Machines? Why is it Learning’ – by 5
important to scale the inputs when using Aurelien Geron
SVMs? (O’Reilly, SPD,
3rded, 2022)
32. What are the advantages and 5 ‘Machine Chapter 186
disadvantages of Decision Trees? What is Learning’ – by 6
Decision Tree pruning, and why is it Aurelien Geron
important? (O’Reilly, SPD,
3rded, 2022)
33. If it takes one hour to train a Decision 5 ‘Machine Chapter 208
Tree on a training set containing 1 million Learning’ – by 6
instances, roughly how much time will it Aurelien Geron
take to train another Decision Tree on a (O’Reilly, SPD,
training set containing 10 million 3rded, 2022)
instances?
34. Let us say that for a classification 5 ‘Introduction to Chapter 236
problem, we already have a trained Machine 9
decision tree. How can we use it in Learning’ - by
addition to the training set in constructing Ethem
a k-nearest neighbor classifier? Alpaydin
(MIT Press and
PHI, 3rd ed,
2014)
35. If you have trained five different models 5 ‘Machine Chapter 211
on the exact same training data, and they Learning’ – by 7
all achieve 95% precision, is there any Aurelien Geron
chance that you can combine these (O’Reilly, SPD,
models to get better results? If so, how? If 3rded, 2022)
not, why?
36. Explain the concept of Gaussian (Normal) 5 ‘Introduction to Chapter 485
Distribution in parametric estimation. Machine 16
How is it used in probability density Learning’ - by
estimation? Ethem
Alpaydin
(MIT Press and
PHI, 3rd ed,
2014)
37. What is non-parametric estimation of 5 ‘Introduction to Chapter 185
probability densities? Compare it with Machine 8
parametric estimation and discuss when it Learning’ - by
is preferable. Ethem
Alpaydin
(MIT Press and
PHI, 3rd ed,
2014)
3|Page
Module 4
38. What is parametric estimation of 5 ‘Introduction to Chapter 214
probability densities? Describe the Machine 9
Maximum Likelihood Estimation (MLE) Learning’ - by
method with an example. Ethem
Alpaydin
(MIT Press and
PHI, 3rd ed,
2014)
39. Describe the Kernel Density Estimation 5 ‘Introduction to Chapter 226
(KDE) method for non-parametric Machine 9
probability density estimation. How does Learning’ - by
the choice of kernel function affect the Ethem
estimation? Alpaydin
(MIT Press and
PHI, 3rd ed,
2014)
40. 10 ‘Machine Chapter 92
Learning’ – by 3
Aurelien Geron
(O’Reilly, SPD,
3rded, 2022)
For a specific dataset related to a
classification problem, confusion matrix
is shown as follows:
Find out the following:
i) The parameters, true positive, true
negative, false positive and false
negative.
ii) Find out the recall, precision, f1-score
and accuracy of the selected classification
model.
41. How does the ROC curve help evaluate a 10 ‘Machine Chapter 97
classifier’s performance? What is the Learning’ – by 3
AUC metric, and how is it related to ROC Aurelien Geron
curves? (O’Reilly, SPD,
3rded, 2022)
42. Describe how a Random Forest classifier 10 ‘Machine Chapter 187
is built and optimized. Learning’ – by 6
Aurelien Geron
(O’Reilly, SPD,
3rded, 2022)
43. Consider the following dataset. 10 ‘Machine Chapter 138
x y Learning’ – by 4
1 3 Aurelien Geron
4|Page
Module 4
2 4 (O’Reilly, SPD,
3 4.5 3rded, 2022)
4 5
Find out the following:
i) Find out regression hypothesis,
hθ(x) for Case I) θ0 = 2.5 and θ1 = 0.65,
Case II) θ0 = -2.5 and θ1 = 0.6,
ii) Find out cost function values for
θ0 and θ1 values as specified in
above-mentioned case studies.
44. Compare different classification metrics 10 ‘Machine Chapter 213
and their suitability in various Learning’ – by 7
applications. Aurelien Geron
(O’Reilly, SPD,
3rded, 2022)
45. Compare and contrast Decision Trees and 10 ‘Machine Chapter 186
Random Forests in classification. Learning’ – by 6
Aurelien Geron
(O’Reilly, SPD,
3rded, 2022)
46. Calculate the distance between a new 10 ‘Machine Chapter 186
entry (Brightness = 20, Saturation = 33) Learning’ – by 6
and other existing values given in the Aurelien Geron
table below using the Euclidean distance (O’Reilly, SPD,
formula for K-Nearest Neighbors 3rded, 2022)
Classifiers. Assume the value of K is 3.
47. What are Precision, Accuracy, Recall, 10 ‘Machine Chapter 92
and F1-Score? How are they used in Learning’ – by 3
classification? Also write their Aurelien Geron
mathematical formula. (O’Reilly, SPD,
3rded, 2022)
48. In business problems, when will you use 10 ‘Machine Chapter 138
5|Page
Module 4
classification over regression? Why a Learning’ – by 4
classification hypothesis is termed Aurelien Geron
“logistic regression”? Explain with proper (O’Reilly, SPD,
mathematical expressions. 3rded, 2022)
49. The dataset of pass/fail in an examination 10 ‘Machine Chapter
for five students are given below. If Learning’ – by 7
logistic regression is used as the classifier Aurelien Geron
and the model suggested by the optimiser (O’Reilly, SPD,
will become the following ODDS of 3rded, 2022)
passing a course: log(ODDS)= - 64 + 2 *
hours.
i) Calculate the “Probability of pass”
for the student who studied 30
hours.
ii) At least how many hours the
student should study that makes
sure he will pass the course with a
probability of more than 92%.
50. Describe the process of constructing a 10 “Understanding Chapter
Decision Tree in Machine Learning. How Machine 18
does the tree decide which feature to split Learning From
on? Explain with an example. Theory to
Algorithms’ -
by Shai Shalev-
Shwartz and
Shai Ben-David
(Cambridge
University
Press, 2014)
51. Given the following dataset, construct a 10 “Understanding Chapter 257
Decision Tree using the Entropy and Machine 18
Information Gain method to determine Learning From
the root node. Theory to
Outlook
Temper
Humidity Wind
Play Algorithms’ -
ature Tennis by Shai Shalev-
Sunny Hot High Weak No Shwartz and
Sunny Hot High Strong No Shai Ben-David
Overcast Hot High Weak Yes (Cambridge
Rainy Mild High Weak Yes University
6|Page
Module 4
Rainy Cool Normal Weak Yes Press, 2014)
Rainy Cool Normal Strong No
Overcast Cool Normal Strong Yes
Sunny Mild High Weak No
Sunny Cool Normal Weak Yes
Rainy Mild Normal Weak Yes
Sunny Mild Normal Strong Yes
Overcast Mild High Strong Yes
Overcast Hot Normal Weak Yes
Rainy Mild High Strong No
i. Calculate the Entropy of the entire
dataset.
ii. Compute the Information Gain for
the attributes Outlook, Temperature,
Humidity, and Wind.
52. Explain the concept of Support Vector 10 ‘Introduction to Chapter 382
Machine (SVM) in Machine Learning. Machine 13
How does SVM find the optimal Learning’ - by
hyperplane for classification? Discuss the Ethem
role of kernel trick in SVM with an Alpaydin
example. (MIT Press and
PHI, 3rd ed,
2014)
53. Given a dataset that is not linearly 10 ‘Introduction to Chapter 382
separable, how does Support Vector Machine 13
Machine (SVM) handle such cases? Learning’ - by
Explain the role of kernel functions in Ethem
transforming data into a higher- Alpaydin
dimensional space. Provide an example (MIT Press and
illustrating the impact of kernel functions. PHI, 3rd ed,
2014)
54. A company wants to classify incoming 10 ‘Introduction to Chapter 467
emails as Spam or Not Spam using the Machine 16
Naïve Bayes Classifier. Given the Learning’ - by
following dataset, calculate the Ethem
probability of an email with the words Alpaydin
"Free" and "Win" being spam using the (MIT Press and
Naïve Bayes Theorem. PHI, 3rd ed,
Spam 2014)
Email
Words in Email (Yes=1,
ID
No=0)
1 Free, Win, Offer 1
2 Free, Money, Buy 1
Hello, Meeting,
3 0
Project
4 Free, Win, Gift 1
Meeting, Schedule,
5 0
Work
6 Buy, Money, Offer 1
7|Page
Module 4
7 Win, Lottery, Free 1
Schedule, Meeting,
8 0
Project
i) Compute the prior probabilities
for Spam and Not Spam.
ii) Compute the likelihood
probabilities for the words "Free"
and "Win" in both Spam and Not
Spam emails.
iii) Use the Naïve Bayes formula to
calculate the probability of an
email with "Free" and "Win"
being Spam.
iv) Determine the classification
(Spam or Not Spam).
55. A Confusion Matrix is used to evaluate 10 “Understanding Chapter 244
the performance of a classification model. Machine 17
Given the following confusion matrix for Learning From
a binary classification problem, calculate Theory to
the Accuracy, Precision, Recall, and Algorithms’ -
F1-Score for the positive class (Class = by Shai Shalev-
1). Shwartz and
Shai Ben-David
Actual \ (Cambridge
Predicted 0 Predicted 1
Predicted University
Press, 2014)
Actual 0 50 10
Actual 1 5 35
i) Define the Confusion Matrix and
its components (TP, FP, TN, FN).
ii) Compute Accuracy, Precision,
Recall, and F1-Score for the
positive class.
iii) Interpret the model's performance
based on these metrics.
8|Page