Question 1 | MCQ
THIS IS QUESTION PAPER FOR THE SUBJECT "DIPLOMA LEVEL : MACHINE LEARNING PRACTICE
(COMPUTER BASED EXAM)"
ARE YOU SURE YOU HAVE TO WRITE EXAM FOR THIS SUBJECT?
CROSS CHECK YOUR HALL TICKET TO CONFIRM THE SUBJECTS TO BE WRITTEN.
(IF IT IS NOT THE CORRECT SUBJECT, PLS CHECK THE SECTION AT THE TOP FOR THE SUBJECTS REGISTERED BY YOU)
(COMPUTER BASED EXAM)"
ARE YOU SURE YOU HAVE TO WRITE EXAM FOR THIS SUBJECT?
CROSS CHECK YOUR HALL TICKET TO CONFIRM THE SUBJECTS TO BE WRITTEN.
(IF IT IS NOT THE CORRECT SUBJECT, PLS CHECK THE SECTION AT THE TOP FOR THE SUBJECTS REGISTERED BY YOU)
Solution
Consider the following pandas DataFrame representing employee training records:

We want to retrieve all records of employees who belong to departments where the average training score is strictly greater than 75.
Which of the following code snippets correctly achieves this?
We want to retrieve all records of employees who belong to departments where the average training score is strictly greater than 75.
Which of the following code snippets correctly achieves this?
Solution
How many features remain in X_new after the transformation?
Solution
Determine the output of the following text preprocessing pipeline:

Solution
Four data points are given:
A=(1,1), B=(2,2), C=(8,8), D=(10,10)
A hierarchical agglomerative clustering algorithm using single linkage and Euclidean distance is applied.
Initially, each point is considered as an individual cluster.
Which two clusters will be merged in the first step?
A=(1,1), B=(2,2), C=(8,8), D=(10,10)
A hierarchical agglomerative clustering algorithm using single linkage and Euclidean distance is applied.
Initially, each point is considered as an individual cluster.
Which two clusters will be merged in the first step?
Solution
A genre-based content recommender uses the 19 one-hot genre columns of each movie:

Which of the following statements is TRUE?
Which of the following statements is TRUE?
Solution
Inscript
What is the output of the following preprocessing pipeline code? (Round off to 2 decimal places if applicable)

What is the output of the following preprocessing pipeline code? (Round off to 2 decimal places if applicable)
Solution
Inscript
Suppose the orginal dataset has 10 rows (1 to 10)
Which row/rows of the dataset will be printed if the following code is executed?

Enter the line number (1,2...,10) of the printed row.
If multiple lines are printed enter the sum of the row numbers (i.e. if line 1 and 2 are printed enter
3)
Suppose the orginal dataset has 10 rows (1 to 10)
Which row/rows of the dataset will be printed if the following code is executed?
Enter the line number (1,2...,10) of the printed row.
If multiple lines are printed enter the sum of the row numbers (i.e. if line 1 and 2 are printed enter
3)
Solution
Inscript

The pipeline first imputes the missing value with the (mean) strategy and then standardizes the column. What is the value of
(the transformed value of the first sample, whose original value is 2)? (Enter up to 2 decimals)
The pipeline first imputes the missing value with the (mean) strategy and then standardizes the column. What is the value of
Solution
Inscript
Consider a 3 class classification problem where the training dataset contains 10 features. The given model is trained on the dataset.
What is the output of the code given below?

Consider a 3 class classification problem where the training dataset contains 10 features. The given model is trained on the dataset.
What is the output of the code given below?
Solution
Inscript
Assume both models in the code given below are fit on the same dataset (X_train) containing 10
features.

Enter the difference between the total number of learnable parameters in both the models. (Enter the absolute value of the difference)
Assume both models in the code given below are fit on the same dataset (X_train) containing 10
features.
Enter the difference between the total number of learnable parameters in both the models. (Enter the absolute value of the difference)
Solution
Inscript
What is the output of the following code? (Round Upto one decmimal)
X = [[0], [1], [2], [3]] y = [0, 0, 1, 1] from sklearn.neighbors import RadiusNeighborsRegressor neigh = RadiusNeighborsRegressor(radius=1.0) neigh.fit(X, y) print(neigh.predict([[1.5]]))
What is the output of the following code? (Round Upto one decmimal)
X = [[0], [1], [2], [3]] y = [0, 0, 1, 1] from sklearn.neighbors import RadiusNeighborsRegressor neigh = RadiusNeighborsRegressor(radius=1.0) neigh.fit(X, y) print(neigh.predict([[1.5]]))
Solution
Inscript
Consider the following feature matrix with one missing entry, imputed using
:

The nearest neighbours are decided using the nan-aware (weighted) Euclidean distance computed over the present coordinates. What is the imputed value at position
? (Enter up to 2 decimals)
Consider the following feature matrix with one missing entry, imputed using
The nearest neighbours are decided using the nan-aware (weighted) Euclidean distance computed over the present coordinates. What is the imputed value at position
Solution
Inscript
A binary classification model was evaluated on a test set with 500 samples. The model correctly identified 90 positive samples and 360 negative samples. Out of all the samples predicted as positive, 120 were predicted as positive. There were 100 actual positive samples in the dataset.
Compute the F1-score of the model. (Round to 2 decimals)
A binary classification model was evaluated on a test set with 500 samples. The model correctly identified 90 positive samples and 360 negative samples. Out of all the samples predicted as positive, 120 were predicted as positive. There were 100 actual positive samples in the dataset.
Compute the F1-score of the model. (Round to 2 decimals)
Solution
Select the false statements:
Solution
Which of the following metrics have their lower bound as 0?
Solution
Regarding building pipelines with
and
, select all statements that are correct.
Solution
Consider the following implementation of PCA:

Which of the following are correct?
Which of the following are correct?
Solution
Consider the following two ensemble regression architectures trained on the same dataset:

How do these two models differ in their output strategy to produce the final prediction
for a given test instance, and how does adding more estimators affect them?
How do these two models differ in their output strategy to produce the final prediction
Solution
Consider the following code snippet:

Which of the following holds true?
Which of the following holds true?
Solution
Consider the following assertion and reason. Select the correct option.
Assertion (A):
Increasing the number of estimators in AdaBoost can sometimes reduce the test accuracy, even though the training error continues to decrease.
Reason (R):
In AdaBoost, after each iteration, the weights of correctly classified training samples are increased so that future weak learners focus more on these correct samples.
Choose the correct option:
Assertion (A):
Increasing the number of estimators in AdaBoost can sometimes reduce the test accuracy, even though the training error continues to decrease.
Reason (R):
In AdaBoost, after each iteration, the weights of correctly classified training samples are increased so that future weak learners focus more on these correct samples.
Choose the correct option:
Solution
An email service develops a machine learning model to automatically identify phishing emails.
Any email predicted as phishing is immediately moved to the user's spam folder without notification. A legitimate email incorrectly marked as phishing could cause users to miss important messages, while an actual phishing email that is not detected can still be reported manually by the user.
The company wants to minimize the number of legitimate emails incorrectly classified as phishing.
Which evaluation metric should be given the highest priority while selecting the model?
Any email predicted as phishing is immediately moved to the user's spam folder without notification. A legitimate email incorrectly marked as phishing could cause users to miss important messages, while an actual phishing email that is not detected can still be reported manually by the user.
The company wants to minimize the number of legitimate emails incorrectly classified as phishing.
Which evaluation metric should be given the highest priority while selecting the model?
Solution
Which data augumentation operation is being perfomed on the input image in the given code?

Solution
Consider the following code:

Assuming the all the models are trained on the same dataset, which of the models is likely to converge the slowest?
Assuming the all the models are trained on the same dataset, which of the models is likely to converge the slowest?
Solution
A monthly airline-passenger series shows seasonal swings that grow larger as the overall level of the series rises over the years. It is decomposed as:

Which value should fill the blank, and for which reason?
Which value should fill the blank, and for which reason?
Solution
Identify the lines with errors in the given code snippet:

Solution
Select the correct statements regarding the following code snippet:

Solution
A company uses K-Means clustering to divide its customers into 4 groups based on their purchasing behavior. After training the model, the data science team observes the following:
Two different runs of K-Means on the same dataset produce different customer groups. One cluster contains customers that are much farther away from their assigned cluster center compared to other clusters.
Which of the following statements are most likely to explain these observations?
Two different runs of K-Means on the same dataset produce different customer groups. One cluster contains customers that are much farther away from their assigned cluster center compared to other clusters.
Which of the following statements are most likely to explain these observations?
Solution
Identify which of the following lines (marked in comments) contain errors in the given code snippet:

Solution
Inscript
Consider the following user–item rating matrix (rows = users, columns = items; a
means not rated):

Using user–user collaborative filtering, the predicted rating is

taken over the users who have rated the target item, where
is the similarity of those users to the target user and
are their ratings of that item.
Predict the rating that user U4 would give to item I5. (Answer up to 2 decimals.)
Consider the following user–item rating matrix (rows = users, columns = items; a
Using user–user collaborative filtering, the predicted rating is
taken over the users who have rated the target item, where
Predict the rating that user U4 would give to item I5. (Answer up to 2 decimals.)
Solution
A forecasting model achieves an R2 score of 0.98 on the test set. However, it was trained using a feature that contains the sales value of the next day.
Which of the following is the most appropriate conclusion?
Which of the following is the most appropriate conclusion?
Solution
Shape
Thickness [ / ]
3
All colors