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)
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
The adfuller() function in statsmodels is used to test:
Solution
What will typically happen if series_with_nans contains NaNs (null values) ?
Solution
A newly launched movie has no ratings, but metadata such as genre, cast, and director is available. Which algorithm can still recommend it?
Solution
Performing singular value decomposition on a user-item matrix aims to:
Solution
Which of the following can be used to evaluate the outputs of the KNNClassifier?
Solution
What is the output of the following standard scaler transformation?

Solution
What is the value of recall score computed in the following code? (Enter upto 2 decimals)

Solution
Which of the following algorithms don't get impacted by feature scaling?
Solution
Consider the following data preprocessing code. What are the number of zero(s) in the transformed labels vector after applying label encoding?

Solution
What does metric in the following code measure?

Solution
Compute cosine similarity for the two items which have feature vectors as given below (rounded to 2 decimals).

Solution
Identify the datatypes of the two datasets given below:
(Assume all library imports are correctly done)

(Assume all library imports are correctly done)
Solution
Which of the following statements about Hierarchical Agglomerative Clustering is TRUE?
Solution
You are using a ColumnTransformer to preprocess a dataset before training a model:

What will be the shape of the transformed matrix X?
What will be the shape of the transformed matrix X?
Solution
Solution
You are given the following dataset and model:

What is the value of prediction after running this code?
What is the value of prediction after running this code?
Solution
For the RandomForestClassifier select the correct pair(s) of parameter(s) and their explanation(s).
Solution
What is the output of the following code?

Solution
Consider the following code snippet. Assume that all required libraries have been imported correctly.

A practitioner observes that each time the fit() method is called on clf, the model is trained from scratch and the parameters learned in the previous training call are discarded.
Which of the following changes should be made so that the model continues training from the previously learned parameters when fit() is called again?
A practitioner observes that each time the fit() method is called on clf, the model is trained from scratch and the parameters learned in the previous training call are discarded.
Which of the following changes should be made so that the model continues training from the previously learned parameters when fit() is called again?
Solution
Consider the following cases for splitting train and test data for some real world dataset.

Which of the following hold true?
Which of the following hold true?
Solution
You are performing hyperparameter tuning using GridSearchCV for a machine learning model. The following parameter grid is provided:

How many unique hyperparameter combinations will GridSearchCV evaluate in total?
How many unique hyperparameter combinations will GridSearchCV evaluate in total?
Solution
You are using make_blobs to generate synthetic data for clustering:

What will the output of the above clustering show?
What will the output of the above clustering show?
Solution
What does the following pandas code do ?

Solution
What does the parameter hidden_layer_sizes=(50, 30) represent in both MLPClassifier and MLPRegressor?
Solution
What is the role of the alpha=1.0 parameter in the given sklearn code to build a regression model?

Solution
What is the output of the following code?

Solution
Which of the following is a hyper parameter?
Solution
Consider the following code snippet that trains a Decision Tree classifier using scikit-learn:

A node in the trained decision tree is split only if both of the following conditions are satisfied:
- The node contains at least min_samples_split samples.
- Each child node created after the split contains at least min_samples_leaf samples.
Assume node (N) is a non-leaf node being considered for splitting.
In which of the following cases will the split at node (N) be allowed?
A node in the trained decision tree is split only if both of the following conditions are satisfied:
- The node contains at least min_samples_split samples.
- Each child node created after the split contains at least min_samples_leaf samples.
Assume node (N) is a non-leaf node being considered for splitting.
In which of the following cases will the split at node (N) be allowed?
Solution
Consider the following ensemble model built using VotingClassifier with voting='soft':

How is the final prediction for a test sample obtained?
How is the final prediction for a test sample obtained?
Solution
You are given a dataset where each row represents a customer using two numerical features. You apply K-means clustering with K=3 clusters using the following code:

What does the variable labels represent after the model is fitted?
What does the variable labels represent after the model is fitted?
Solution
Shape
Thickness [ / ]
3
All colors