Question 1 | MCQ
Solution
Solution
Solution
Comprehension Passage
Consider the following confusion matrix. Positive class is represented by ‘True’ and negative class is represented by ‘False’.

Based on the above data, answer the given subquestions.
Based on the above data, answer the given subquestions.
Find the value of the accuracy. Write your answer correct upto 2 decimal places, do not round up or off.
Solution
Comprehension Passage
Consider the following confusion matrix. Positive class is represented by ‘True’ and negative class is represented by ‘False’.

Based on the above data, answer the given subquestions.
Based on the above data, answer the given subquestions.
Find the value of the precision. Write your answer correct upto 2 decimal places, do not round up or off.
Solution
Comprehension Passage
Consider the following confusion matrix. Positive class is represented by ‘True’ and negative class is represented by ‘False’.

Based on the above data, answer the given subquestions.
Based on the above data, answer the given subquestions.
Find the value of the recall. Write your answer correct upto 2 decimal places, do not round up or off.
Solution
Comprehension Passage
Consider the following confusion matrix. Positive class is represented by ‘True’ and negative class is represented by ‘False’.

Based on the above data, answer the given subquestions.
Based on the above data, answer the given subquestions.
Find the value of the F-1 score. Write your answer correct upto 2 decimal places, do not round up or off.
Solution
Comprehension Passage
Ajay has a dataset that has a non-linear relationship between the features and the label. The dimension of training samples is 4×2 (excluding the additional all-ones feature for the bias term, which you should add), label vector is 4 × 1 and weight vector is 3 × 1.

Based on the above data, answer the given subquestions.
Based on the above data, answer the given subquestions.
Suppose Ajay has to compute the ridge loss value for this data with regularization parameter value as 0.2 for performing ridge regression. What will be the value of ridge loss correct up to 2 decimal places?
Solution
Comprehension Passage
Ajay has a dataset that has a non-linear relationship between the features and the label. The dimension of training samples is 4×2 (excluding the additional all-ones feature for the bias term, which you should add), label vector is 4 × 1 and weight vector is 3 × 1.

Based on the above data, answer the given subquestions.
Based on the above data, answer the given subquestions.
For the same dataset, suppose Ajay has to compute the lasso loss value with regularization
parameter value as 0.2 for performing lasso regression. What will be the value of lasso loss correct up to 2 decimal places?
parameter value as 0.2 for performing lasso regression. What will be the value of lasso loss correct up to 2 decimal places?
Solution
Comprehension Passage
Based on the above data, answer the given subquestions.
What will be the prediction for an example having the features vector as (2, 1)? Assume the classes are 1 and −1.
NOTE:Enter your answer to the nearest integer.
NOTE:Enter your answer to the nearest integer.
Solution
Comprehension Passage
Based on the above data, answer the given subquestions.
Find the accuracy for the given test data-set. Write your answer correct to two decimal places.

Solution
Comprehension Passage
Consider the following code snippet

Based on the above data, answer the given subquestions.
Based on the above data, answer the given subquestions.
What is the output of following code snippet?

Solution
Comprehension Passage
Consider the following code snippet

Based on the above data, answer the given subquestions.
Based on the above data, answer the given subquestions.
What is the output of following code snippet?

Solution
Comprehension Passage
Abhishek trains a polynomial regression model on a dataset. He tries with different degree of polynomial transformation and gets following learning curve:

Based on the above data, answer the given subquestions.
Based on the above data, answer the given subquestions.
What value of degree of polynomial transformation should Abhishek choose for the given dataset?
NOTE:Enter your answer to the nearest integer.
NOTE:Enter your answer to the nearest integer.
Solution
Comprehension Passage
Abhishek trains a polynomial regression model on a dataset. He tries with different degree of polynomial transformation and gets following learning curve:

Based on the above data, answer the given subquestions.
Based on the above data, answer the given subquestions.
What do you think will happen if Abhishek tries to fit a linear regression model with polynomial transformation of degree 20?
Solution
Solution
Solution
Brijmohan trains his linear regression model with three different values of learning rate, i.e.α1,α2 andα3, for the same training set. He gets learning curves as displayed in the following chart.

Which of the following correctly explains relationship amongα1,α2andα3?
Which of the following correctly explains relationship amongα1,α2andα3?
Solution
Which of the following can NOT be a linear regression model?
Solution
Which of the following correctly computes the solution of linear regression problem via normal equation method? Assume necessary imports.
Solution
In ridge regression, the loss function is computed asJ(w) =L+λPWherePis penalty term for ridge regularization,λis rate of regularization andLis plain loss function without any regularization. Choose the correct statements from the following:
Solution
Solution
Ankita had a feature vectorxand she wanted to apply polynomial transformation onx. She had written a code snippet as follows:

What is the output of the code snippet?
What is the output of the code snippet?
Solution
A classification model was trained on some training examples with two features and three classes (0, 1 and 2) using least square algorithm. The learnt weight matrix is

(Remember forkclass classification problem withmfeatures, shape of weight matrix is (m+ 1) ×k)
Which class will the sample (-1, 1) be classified to?
NOTE:Enter your answer to the nearest integer.
(Remember forkclass classification problem withmfeatures, shape of weight matrix is (m+ 1) ×k)
Which class will the sample (-1, 1) be classified to?
NOTE:Enter your answer to the nearest integer.
Solution
Consider the decision boundary learnt using a perceptron algorithm as shown in the figure. Find the loss associated with this model.
Note: Since, perceptron model doesn’t converge for non linearly separable data, we have terminated the learning process after a fixed numbers of iterations.

NOTE:Enter your answer to the nearest integer.
Note: Since, perceptron model doesn’t converge for non linearly separable data, we have terminated the learning process after a fixed numbers of iterations.
NOTE:Enter your answer to the nearest integer.
Solution
NOTE:Enter your answer in two decimal places.
Solution
Shape
Thickness [ / ]
3
All colors