Question 1 | MCQ
THIS IS QUESTION PAPER FOR THE SUBJECT "DIPLOMA LEVEL :MACHINE LEARNING PRACTICE"
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
We wish to load digit dataset from sklearn. Which of the following will result into an error?
Solution
Which of the following statements is/are incorrect about the AUC?
Solution
Which of the following options represents the correct option to set the regularization rate in RidgeClassifier?
Solution
Putting loss=hinge in class sklearn.linear_model.SGDClassifier(loss=’hinge’) dictates which of the following loss functions in SGDClassifier?
Solution
Which of the following Naive Bayes algorithms can be applied if the data is imbalanced?
Solution
Which of the following options represents the correct output for the following block of code?

Solution
Mention which of the following statement(s) is / are correct?
1. Statement 1: Incremental learning is a dynamic technique which is applied when training data becomes available gradually over time or its size is out of system memory limits.
2. Statement 2: Sklearn can process large data in batches and updates the model parameters for each batch.
1. Statement 1: Incremental learning is a dynamic technique which is applied when training data becomes available gradually over time or its size is out of system memory limits.
2. Statement 2: Sklearn can process large data in batches and updates the model parameters for each batch.
Solution
Which of the following options implements largest measure of regularization, i.e. which of these models will have lowest overfitting?
Solution
Consider the following scatter plots of four different input datasets:

Which data will be classified better using gaussian rbf kernel?
Which data will be classified better using gaussian rbf kernel?
Solution
Consider following statements regarding a decision tree model:
1. It is a non-parametric model.
2. It has a tendency to underfit if allowed to grow unconditionally.
3. It can be used for regression and classification problems only, but not for clustering.
4. It is one of the most difficult machine learning models to interpret.
5. For regression problems, decision tree’s loss function and evaluation metric can be same.
Choose the option with all the correct statements:
1. It is a non-parametric model.
2. It has a tendency to underfit if allowed to grow unconditionally.
3. It can be used for regression and classification problems only, but not for clustering.
4. It is one of the most difficult machine learning models to interpret.
5. For regression problems, decision tree’s loss function and evaluation metric can be same.
Choose the option with all the correct statements:
Solution
When a node is split in a decision tree (in sklearn):
Solution
Consider following statements:
1. The K-means algorithm aims to choose centroids that minimise the inertia.
2. The K-Means algorithm requires the number of clusters to be specified
Choose the correct option of the following:
1. The K-means algorithm aims to choose centroids that minimise the inertia.
2. The K-Means algorithm requires the number of clusters to be specified
Choose the correct option of the following:
Solution
Hierarchical Clustering can also be called as
Solution
Which of the following options represents the major difference between HashingVectorizer and CountVectorizer?
Solution
The partial_fit in sklearn’s Perceptron model helps to:
Solution
Solution
Which of the following are hyper parameters in a decision tree in sklearn?
Solution
Enter the output (up to 2 decimal points) for the following block of code.

Solution
Consider the following code snippet:

Solution
Which of the following is likely to be the correct output of the code given below?

Solution
Which of the following is likely to be the correct output of the code given below?

Solution
The correct code block or blocks to set adaptive learning rate while using SGDRegressor will be:
Solution
Consider following statements:
1. Statement 1 : In order to extend ROC curve and ROC area to multi-label classification, it is necessary to binarize the output.
2. Statement 2: In SGDClassifier, setting warm_start=True retains the weight values of the model after max_iter and hence produce different results for each execution.
Choose the correct option:
1. Statement 1 : In order to extend ROC curve and ROC area to multi-label classification, it is necessary to binarize the output.
2. Statement 2: In SGDClassifier, setting warm_start=True retains the weight values of the model after max_iter and hence produce different results for each execution.
Choose the correct option:
Solution
Which of the following options represents the correct output for the following block of code?

Solution
Which of the following options represents the correct output for the following block of code?

Solution
Which of the following options represents the correct output of the following block of code?

Solution
You have a regression problem to solve with following information:
1. All features are numerical.
2. The dataset has size of 40 GB.
3. The data has to be preprocessed.
4. After data preprocessing, train the model with gradient descent or its variations.
Which of the following will perform the above task?
1. All features are numerical.
2. The dataset has size of 40 GB.
3. The data has to be preprocessed.
4. After data preprocessing, train the model with gradient descent or its variations.
Which of the following will perform the above task?
Solution
Consider the following code and select the correct options.
(Note: Assume necessary imports.)

(Note: Assume necessary imports.)
Solution
Refer the dataframe(df) given below and enter the correct output (up to 2 decimal points) for the following block of code:

Solution
The output of the following block of code will be:

Solution
Enter the output (up to 2 decimal points) for the following block of code.

Solution
What is the correct output of the following block of code?
[Note: LinearSVC implements “one-vs-the-rest” multi-class strategy]

[Note: LinearSVC implements “one-vs-the-rest” multi-class strategy]
Solution
Which of the following options represents all the correct precision, Recall, and accuracy values for the confusion matrix shown in Figure 1?
[Note: All 3 values should be correct in the same option]

[Note: All 3 values should be correct in the same option]
Solution
Which of the following options represents the correct output of the following block of code?

Solution
Rajesh wants to tune hyper parameters of an AdaBoost model for a classification problem with following specifications:
1. Base estimator as Decision trees classifier with max_depth=1.
2. Number of estimators range from 10 to 20 (both inclusive) at the interval of 1.
3. Cross validation =4.
4. Learning rate must vary between 0.1 to 1.0 (both inclusive) at the intervals of 0.1.
5. Train the best model on the entire training set.
6. Print score on test set.
Which of the following code blocks will correctly execute Rajesh’s task?
[Note: Assume necessary imports and variables for training and test sets.]
1. Base estimator as Decision trees classifier with max_depth=1.
2. Number of estimators range from 10 to 20 (both inclusive) at the interval of 1.
3. Cross validation =4.
4. Learning rate must vary between 0.1 to 1.0 (both inclusive) at the intervals of 0.1.
5. Train the best model on the entire training set.
6. Print score on test set.
Which of the following code blocks will correctly execute Rajesh’s task?
[Note: Assume necessary imports and variables for training and test sets.]
Solution
Asha wants to train a bagging classifier with following specifications:
1. Base estimator as k nearest neighbour classifier with default parameter values.
2. 70% of the data is used to create a bag of samples.
3. Create subsets of training set with replacement.
4. Take all features when bootstrapping.
5. Train the model on training set.
6. Print score on test set.
Which of the following code blocks will correctly execute Asha’s task?
[Note: Assume necessary imports and variables for training and test sets.]
1. Base estimator as k nearest neighbour classifier with default parameter values.
2. 70% of the data is used to create a bag of samples.
3. Create subsets of training set with replacement.
4. Take all features when bootstrapping.
5. Train the model on training set.
6. Print score on test set.
Which of the following code blocks will correctly execute Asha’s task?
[Note: Assume necessary imports and variables for training and test sets.]
Solution
Comprehension Passage
Go through the code snippet given below and answer the given subquestions.

Based on the given code, select all option which will be considered as input alpha value for our RidgeCV estimator.
Solution
Comprehension Passage
Go through the code snippet given below and answer the given subquestions.

Which of the following could be the possible output of print(results.best_score_)?
Solution
Shape
Thickness [ / ]
3
All colors