MauryaHub PYQ Practice

Machine Learning Practice · End Term · Sep 2022 · AN

Machine Learning Practice · End Term · Sep 2022 AN

← Course papers · Start practice / exam

Questions and published explanations below are available without starting a test. Some questions may not have a published solution yet.

0 / 38 published solutions

Question 180 MCQ · 2.0 marks

What will be the shape of X and y?
Source diagram or notation
A.
(120,90) and (120,)
B.
(120,10) and (120,)
C.
(90,120) and (90,)
D.
(90,10) and (90,)

A published solution is not available for this question yet.

Report a correction for Q180

Question 181 MCQ · 2.0 marks

What will be the shape of the feature matrix (X.shape) and the label vector (y.shape) for the following block of code?
Source diagram or notation
A.
(699, 1) and (599, 1)
B.
(500, 1) and (500, 1)
C.
(1, 500) and (1,500)
D.
(599, 1) and (699, 1)

A published solution is not available for this question yet.

Report a correction for Q181

Question 182 MCQ · 2.0 marks

What will be the output of the following code?
Source diagram or notation
A.
Bunch, Tuple, DataFrame, DataFrame
B.
Bunch, Tuple, DataFrame, Tuple
C.
Bunch, Bunch, Bunch, Bunch
D.
DataFrame, DataFrame, DataFrame, DataFrame
E.
Bunch, Ndarray, Bunch, Ndarray
F.
It will result into an error.

A published solution is not available for this question yet.

Report a correction for Q182

Question 183 MCQ · 2.0 marks

Consider following code snippet:
Source diagram or notation
Above classifier uses:
A.
hinge but quadratically penalized.
B.
logistic regression.
C.
linear SVM.
D.
None of these.
E.
perceptron.

A published solution is not available for this question yet.

Report a correction for Q183

Question 184 MCQ · 2.0 marks

Which of the following Naive Bayes algorithms can be applied if the data has discrete features that are categorically distributed?
A.
GaussianNB
B.
CategoricalNB
C.
ComplementNB
D.
None of these

A published solution is not available for this question yet.

Report a correction for Q184

Question 185 MCQ · 2.0 marks

Which of the following options represents the correct output of the following block of code?
Source diagram or notation
A.
[0]
B.
[2]
C.
[1.5]
D.
[1]

A published solution is not available for this question yet.

Report a correction for Q185

Question 186 MCQ · 2.0 marks

Which of the following estimators implement partial_fit method in Regression?
A.
Ridge Regression
B.
SGDRegressor
C.
Linear Regression
D.
Polynomial Regression

A published solution is not available for this question yet.

Report a correction for Q186

Question 187 MCQ · 2.0 marks

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.
A.
Statement 1 is correct but statement 2 is incorrect.
B.
Statement 1 is incorrect but statement 2 is correct.
C.
Statement 1 and statement 2 both are incorrect.
D.
Statement 1 and statement 2 both are correct.

A published solution is not available for this question yet.

Report a correction for Q187

Question 188 MCQ · 2.0 marks

Which of the following options represents the correct value of gamma for **SVC_classifier =** **SVC(gamma = ’auto’)**?
A.Source diagram or notation
B.Source diagram or notation
C.Source diagram or notation
D.Source diagram or notation

A published solution is not available for this question yet.

Report a correction for Q188

Question 189 MCQ · 2.0 marks

Consider the following scatter plots of four different input datasets:
Source diagram or notation
Which data will be classified better using gaussian rbf kernel?
A.
Data 1
B.
Data 3
C.
Data 4
D.
Data 2

A published solution is not available for this question yet.

Report a correction for Q189

Question 190 MCQ · 2.0 marks

When a node is split further in a decision tree:
A.
It creates only two new children nodes always.
B.
It can create two or more new children nodes always.
C.
It depends on the cardinality of the categorical feature.
D.
It depends on the scale of the numerical feature.

A published solution is not available for this question yet.

Report a correction for Q190

Question 191 MCQ · 2.0 marks

Which of the following is/are Correct for K-means algorithm.
A.
The algorithm is sensitive to outliers.
B.
It terminates at a local optimum if SSE is used.
C.
k-means is considered to be a linear algorithm.
D.
All of these

A published solution is not available for this question yet.

Report a correction for Q191

Question 192 MCQ · 2.0 marks

Hierarchical Clustering can also be called:
A.
Centroid Based Clustering
B.
Distribution-based Clustering
C.
Density-based Clustering
D.
Connectivity-Based Clustering

A published solution is not available for this question yet.

Report a correction for Q192

Question 193 MSQ · 2.0 marks

Which of the following options represents the major difference between HashingVectorizer and CountVectorizer?
A.
CountVectorizer does not store vocabulary, its object takes less space compared to HashingVectorizer
B.
HashingVectorizer does not store vocabulary, its object takes less space compared to CountVectorizer
C.
CountVectorizer alleviates any dependence with function calls performed on the previous chunk of data in case of incremental learning
D.
HashingVectorizer alleviates any dependence with function calls performed on the previous chunk of data in case of incremental learning

A published solution is not available for this question yet.

Report a correction for Q193

Question 194 MSQ · 2.0 marks

Which of the following statements correctly set L1 penalty to 0.2 and L2 Penalty to 0.8 in LogisticRegression?
A.Source diagram or notation
B.Source diagram or notation
C.Source diagram or notation
D.Source diagram or notation

A published solution is not available for this question yet.

Report a correction for Q194

Question 195 MSQ · 2.0 marks

Which of the following are hyper parameters in a decision tree?
A.
Number of features
B.
Number of minimum samples to split
C.
Height of the tree
D.
Diameter of the tree

A published solution is not available for this question yet.

Report a correction for Q195

Question 196 MSQ · 3.0 marks

Which of the following statements are incorrect about the AUC?
A.
The ROC curve plots sensitivity (recall) on the x-axis against specificity on the y- axis
B.
A completely effective classifier is a diagonal line, and it will have an AUC of 0.5.
C.
The larger the value of AUC, the less effective the classifier.
D.
An AUC of 1 indicates a perfect classifier, which means it gets all the 1s correctly classified, and doesn’t misclassify any 0s as 1s.
E.
None of these

A published solution is not available for this question yet.

Report a correction for Q196

Question 197 NAT · 3.0 marks

The output of the following block of code will be:
Source diagram or notation

A published solution is not available for this question yet.

Report a correction for Q197

Question 198 NAT · 3.0 marks

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

A published solution is not available for this question yet.

Report a correction for Q198

Question 199 NAT · 3.0 marks

Enter the output (up to 2 decimal points) for the following block of code.
Source diagram or notation

A published solution is not available for this question yet.

Report a correction for Q199

Question 200 NAT · 3.0 marks

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

A published solution is not available for this question yet.

Report a correction for Q200

Question 201 MCQ · 3.0 marks

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]
Source diagram or notation
A.
Precision: 0.833 , Recall: 0.875, Accuracy: 0.833
B.
Precision: 0.875, Recall: 0.833, Accuracy: 0.833
C.
Precision: 0.9783, Recall: 0.9281, Accuracy: 0.909
D.
None of these

A published solution is not available for this question yet.

Report a correction for Q201

Question 202 MCQ · 3.0 marks

Consider the following code snippet:
Source diagram or notation
which of the following could be the correct output?
A.
array([[1., 2., 1., 4., 2., 1.], [1., 2., 1., 4., 2., 1.]])
B.
array([[1., 2., 1., 4., 2., 1., 4., 4., 2., 1.], [1., 2., 1., 4., 2., 1., 4., 4., 2., 1.]])
C.
array([[1., 2., 1., 2.], [1., 2., 1., 2.]])
D.
array([[1., 2., 1., 4., 2., 1., 8., 4., 2., 1.], [1., 2., 1., 4., 2., 1., 8., 4., 2., 1.]])

A published solution is not available for this question yet.

Report a correction for Q202

Question 203 MCQ · 3.0 marks

Which of the following is likely to be the correct output of the code given below?
Source diagram or notation
A.
[0.95238095, 0. ]
B.
[0.85,0.1,0.05]
C.
[2,3,1]
D.
[0.85,0]
E.
There are some mistakes in the 3rd /4th line of code, hence it will produce error.

A published solution is not available for this question yet.

Report a correction for Q203

Question 204 MCQ · 3.0 marks

Which of the following is likely to be the correct output of the code given below?
Source diagram or notation
A.
5
B.
99
C.
Given code will produce an error
D.
0.82

A published solution is not available for this question yet.

Report a correction for Q204

Question 205 MCQ · 3.0 marks

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.‘
A.
Statement 1 is correct but statement 2 is incorrect.
B.
Statement 1 is incorrect but statement 2 is correct.
C.
Statement 1 and statement 2 both are incorrect.
D.
Statement 1 and statement 2 both are correct.

A published solution is not available for this question yet.

Report a correction for Q205

Question 206 MCQ · 3.0 marks

Which of the following options represents the correct option to set the regularization rate in RidgeClassifier?
A.Source diagram or notation
B.Source diagram or notation
C.Source diagram or notation
D.Source diagram or notation

A published solution is not available for this question yet.

Report a correction for Q206

Question 207 MCQ · 3.0 marks

Which of the following options represents the correct output for the following block of code?
Source diagram or notation
A.
(11, 1)
B.
(1, 10)
C.
(1, 11)
D.
(10, 1)

A published solution is not available for this question yet.

Report a correction for Q207

Question 208 MCQ · 3.0 marks

Which of the following options represents the correct output for the following block of code?
Source diagram or notation
A.
array([, ’is’, ’name’, ’the’], dtype=object)
B.
array([’bond’, ’is’, ’james’, ’name’, ’the’,’ !’], dtype=object)
C.
array([’bond’, ’bond’, ’is’, ’james’, ’name’, ’the’], dtype=object)
D.
array([’bond’, ’is’, ’james’, ’name’, ’the’], dtype=object)

A published solution is not available for this question yet.

Report a correction for Q208

Question 209 MCQ · 3.0 marks

Which of the following options represents the correct output of the following block of code?
Source diagram or notation
A.
array([2])
B.
array([1.5])
C.
array([1])
D.
array([0])

A published solution is not available for this question yet.

Report a correction for Q209

Question 210 MCQ · 3.0 marks

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:
A.
2, 3
B.
1, 3, 5
C.
3, 5
D.
2, 4
E.
1, 3, 4
F.
1, 2, 4

A published solution is not available for this question yet.

Report a correction for Q210

Question 211 MCQ · 3.0 marks

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.]
A.Source diagram or notation
B.Source diagram or notation
C.Source diagram or notation
D.Source diagram or notation
E.Source diagram or notation

A published solution is not available for this question yet.

Report a correction for Q211

Question 212 MCQ · 3.0 marks

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?
A.
Perform one hot encoding followed by training with LogisticRegression model (sklearn.linear_model).
B.
Perform standard scaling followed by a sklearn.neighbors.KNeighborsClassifier model.
C.
Perform min-max scaling followed by a sklearn.tree.DecisionTreeClassifier model.
D.
Perform max-absolute scaling followed by a sklearn.linear_model.SGDClassifier model.

A published solution is not available for this question yet.

Report a correction for Q212

Question 213 MCQ · 3.0 marks

Source diagram or notation
A.
(784, 100)
B.
(784, 1)
C.
(1, 784)
D.
(100, 784)

A published solution is not available for this question yet.

Report a correction for Q213

Question 214 MCQ · 4.0 marks

Which of the following options represents the correct output of the following block of code?
Source diagram or notation
A.
1
B.
0
C.
0.110
D.
0.223
E.
0.533

A published solution is not available for this question yet.

Report a correction for Q214

Question 215 MCQ · 4.0 marks

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.]
A.Source diagram or notation
B.Source diagram or notation
C.Source diagram or notation
D.Source diagram or notation
E.Source diagram or notation

A published solution is not available for this question yet.

Report a correction for Q215

Question 216 MSQ · 3.0 marks

Go through the code snippet given below and answer the subquestions.
Source diagram or notation
Based on the given code,Select all option Which will be considered as input alpha value for our RidgeCV estimator.
A.
0.055
B.
0.05
C.
0.905
D.
0.1
E.
1

A published solution is not available for this question yet.

Report a correction for Q216

Question 217 MCQ · 3.0 marks

Go through the code snippet given below and answer the subquestions.
Source diagram or notation
Which of the following could be the possible output of print(results.best_score_)?
A.
1
B.
-2999.79
C.
0.528
D.
0.681       **PDSA** **Section Id :** 64065329424 **Section Number :** 8 **Section type :** Online **Mandatory or Optional :** Mandatory **Number of Questions :** 30 **Number of Questions to be attempted :** 30 **Section Marks :** 100 **Display Number Panel :** Yes **Group All Questions :** No **Enable Mark as Answered Mark for Review and** Yes **Clear Response :** **Maximum Instruction Time :** 0

A published solution is not available for this question yet.

Report a correction for Q217