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
What will be the shape of X and y?

Solution
What will be the shape of the feature matrix (X.shape) and the label vector (y.shape) for the
following block of code?

following block of code?
Solution
What will be the output of the following code?

Solution
Consider following code snippet:

Above classifier uses:
Above classifier uses:
Solution
Which of the following Naive Bayes algorithms can be applied if the data has discrete features that are categorically distributed?
Solution
Which of the following options represents the correct output of the following block of code?

Solution
Which of the following estimators implement partial_fit method in Regression?
Solution
Mention which of the following statement(s) is / are correct?
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.
Statement 2: Sklearn can not process large data in batches.
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.
Statement 2: Sklearn can not process large data in batches.
Solution
Which of the following options represents the correct value of gamma for SVC_classifier = SVC(gamma = ’auto’)?
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
When a node is split further in a decision tree:
Solution
Which of the following is/are Correct for K-means algorithm.
Solution
Hierarchical Clustering can also be called:
Solution
Which of the following options represents the major difference between HashingVectorizer and CountVectorizer?
Solution
Which of the following statements correctly set L1 penalty to 0.2 and L2 Penalty to 0.8 in LogisticRegression?
Solution
Which of the following are hyper parameters in a decision tree?
Solution
Which of the following statements are incorrect about the AUC?
Solution
The output of the following block of code will be:

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

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]

Solution
Consider the following code snippet:

which of the following could be the correct output?
which of the following could be the correct output?
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
Mention whether the following statements are TRUE or FALSE .
Statement 1 : ‘In order to extend ROC curve and ROC area to multi-label classification, it is necessary to binarize the output.‘
Statement 2: In SGDClassifier, setting warm_start=True does not retain the weight values of the model after max_iter and hence does not produce different results for each execution.‘
Statement 1 : ‘In order to extend ROC curve and ROC area to multi-label classification, it is necessary to binarize the output.‘
Statement 2: In SGDClassifier, setting warm_start=True does not retain the weight values of the model after max_iter and hence does not produce different results for each execution.‘
Solution
Which of the following options represents the correct option to set the regularization rate in RidgeClassifier?
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
Consider following statements regarding a decision tree model?
1. It is a parametric model.
2. It has a tendency to overfit if allowed to grow unconditionally.
3. It can be used for regression, classification and clustering problems.
4. It is one of the easiest machine learning models to interpret.
5. For classification problems, decision tree’s loss function is same as evaluation metric.
Choose the option with all the correct statements:
1. It is a parametric model.
2. It has a tendency to overfit if allowed to grow unconditionally.
3. It can be used for regression, classification and clustering problems.
4. It is one of the easiest machine learning models to interpret.
5. For classification problems, decision tree’s loss function is same as evaluation metric.
Choose the option with all the correct statements:
Solution
Lata wants to train a bagging regressor with following specifications:
1. Base estimator as linear regressor with default parameter values.
2. 80% of the data is used to create a bag of samples.
3. Create subsets of training set without replacement.
4. Take half the features when creating subsets of data.
5. Train the model on training set.
6. Print score on test set.
Which of the following code blocks will correctly execute Lata’s task?
[Note: Assume necessary imports and variables for training and test sets.]
1. Base estimator as linear regressor with default parameter values.
2. 80% of the data is used to create a bag of samples.
3. Create subsets of training set without replacement.
4. Take half the features when creating subsets of data.
5. Train the model on training set.
6. Print score on test set.
Which of the following code blocks will correctly execute Lata’s task?
[Note: Assume necessary imports and variables for training and test sets.]
Solution
You have a binary classification problem to solve with following information:
1. All features are numircal.
2. The dataset has size of 80 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 numircal.
2. The dataset has size of 80 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
Solution
Which of the following options represents the correct output of the following block of code?

Solution
Brajesh 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 30 to 40 (both inclusive) at the interval of 1.
3. Cross validation = 5.
4. Learning rate must vary between 0.2 to 2.0 (both inclusive) at the intervals of 0.2.
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 Brajesh’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 30 to 40 (both inclusive) at the interval of 1.
3. Cross validation = 5.
4. Learning rate must vary between 0.2 to 2.0 (both inclusive) at the intervals of 0.2.
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 Brajesh’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 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 subquestions.

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