0% found this document useful (0 votes)
86 views

Assignment Week 2

This document contains 10 multiple choice questions about machine learning topics such as entropy, decision trees, linear regression, and overfitting. The questions cover concepts like calculating entropy from class distributions, properties of decision trees and linear regression, and factors that influence overfitting. Correct answers and detailed solutions are provided for each question.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
86 views

Assignment Week 2

This document contains 10 multiple choice questions about machine learning topics such as entropy, decision trees, linear regression, and overfitting. The questions cover concepts like calculating entropy from class distributions, properties of decision trees and linear regression, and factors that influence overfitting. Correct answers and detailed solutions are provided for each question.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

NPTEL Online Certification Courses Indian

Institute of Technology Kharagpur

Introduction to
Machine Learning
Assignment- Week 2
TYPE OF QUESTION: MCQ
Number of questions: 10 Total mark: 10 X 2 = 20

MCQ Question
QUESTION 1:

In a binary classification problem, out of 30 data points 12 belong to class I and 18 belong to
class II. What is the entropy of the data set?
A. 0.97
B. 0
C. 1
D. 0.67
Correct Answer : A. 0.97

Detailed Solution :
𝐸𝑁𝑇𝑅𝑂𝑃𝑌(𝑝+, 𝑝−) = − 𝑝+𝑙𝑜𝑔2𝑝+ − 𝑝−𝑙𝑜𝑔2𝑝− , here
𝑝+ = 12/30 𝑎𝑛𝑑 𝑝− = 18/30
______________________________________________________________________________

QUESTION 2:
Decision trees can be used for the problems where

A. the attributes are categorical.


B. the attributes are numeric valued.
C. the attributes are discrete valued.
D. In all the above cases.

Correct Answer: D. In all the above cases.

Detailed Solution : Decision trees can be applied in all 3 cases.

______________________________________________________________________________
QUESTION 3:

Which of the following is false?

A. Variance is the error of the trained classifier with respect to the best classifier in the
concept class.
B. Variance depends on the training set size.
C. Variance increases with more training data.
D. Variance increases with more complicated classifiers.

Correct Answer : C. Variance increases with more training data.

Detailed Solution : Variance decreases with more training data.

______________________________________________________________________________

QUESTION 4:
In linear regression, our hypothesis is ℎθ(𝑥) = θ0 + θ1𝑥, the training data is given in the table.
X y
6 7
5 4
10 9
3 4
𝑚
2
If the cost function is 𝐽(θ) =
1
2𝑚 ( )
∑ (ℎθ 𝑥𝑖 − 𝑦𝑖) , where m is no. of training data points.
𝑖=1
What is the value of 𝐽(θ) when θ = (1,1).
A. 0
B. 1
C. 2
D. 0.5

Correct Answer: B. 1
Detailed Solution : Substitute θ0 by 1 and θ1 by 1 and compute 𝐽(θ).

______________________________________________________________________________
______________________________________________________________________________

QUESTION 5:
The value of information gain in the following decision tree is:

A. 0.380
B. 0.620
C. 0.190
D. 0.477

Correct Answer: A
Detailed Solution :
Information Gain = 0.996 - ( (17/30)*0.787 + (13/30)*0.391 ) = 0.380

___________________________________________________________________
QUESTION 6:

What is true for Stochastic Gradient Descent?


A. In every iteration, model parameters are updated for multiple training samples
B. In every iteration, model parameters are updated for one training sample
C. In every iteration, model parameters are updated for all training samples
D. None of the above
Correct Answer : B. In every iteration model parameters are updated for one training
sample.
Detailed Solution : In batch gradient descent, multiple training samples are used and in
stochastic gradient descent, one training sample is used to update parameters.
_____________________________________________________________________________

QUESTION 7:
Answer Questions 7-8 with the data given below:
ISRO wants to discriminate between Martians (M) and Humans (H) based on the following
features: Green ∈ {N,Y}, Legs ∈ {2,3}, Height ∈ {S,T}, Smelly ∈ {N,Y}. The training data is as follows:

Species Green Legs Height Smelly

M N 3 S Y

M Y 2 T N

M Y 3 T N

M N 2 S Y

M Y 3 T N

H N 2 T Y

H N 2 S N

H N 2 T N

H Y 2 S N

H N 2 T Y

The entropy of the entire dataset is


A. 0.5
B. 1
C. 0
D. 0.1
Correct Answer: B 1
Detailed Answer : -(1/2)log2(1/2)-(1/2)log2(1/2) = 1
QUESTION 8:

Which attribute will be the root of the decision tree ?


A. Green
B. Legs
C. Height
D. Smelly

Correct Answer : B. Legs


Detailed Solution : Compute the information gain for every attribute and the attribute with the
highest gain will be the root of the decision tree.

_____________________________________________________________________________

QUESTION 9:

In Linear Regression the output is:

A. Discrete
B. Continuous and always lies in a finite range
C. Continuous
D. May be discrete or continuous

Correct Answer : C. Continuous

Detailed Solution : Output of Linear Regression is Continuous.

_____________________________________________________________________________

QUESTION 10:

Identify whether the following statement is true or false?

“Overfitting is more likely when the set of training data is small”

A. True
B. False

Correct Answer : A.True

Detailed Solution : With a small training dataset, it’s easier to find a hypothesis to fit the training
data exactly,i.e., overfit.
_____________________________________________________________________________

*****END*****

You might also like