MauryaHub PYQ Practice

Machine Learning Practice · End Term · Jan 2023 · AN

Machine Learning Practice · End Term · Jan 2023 AN

← Course papers · Start practice / exam

This page contains the reliably extracted subset, not the complete original paper.

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

0 / 36 published solutions

Question 256 MCQ · 2.0 marks

______________ generates a bunch of normally-distributed clusters of points with specific mean and standard deviations for each cluster.
A.
sklearn.datasets.make_clusters()
B.
sklearn.datasets.make_centers()
C.
sklearn.datasets.make_normal_clusters()
D.
sklearn.datasets.make_blobs()

A published solution is not available for this question yet.

Report a correction for Q256

Question 257 MCQ · 2.0 marks

Why is data preprocessing necessary?
A.
Some columns have values only between 0 and 1
B.
The data is divided into multiple types of files i.e. html, csv, tsv, etc.
C.
The data has only numbers in all the columns.

A published solution is not available for this question yet.

Report a correction for Q257

Question 258 MCQ · 2.0 marks

Which of the following is correct with respect to R2-score?
A.
R2 score is always positive and it may go up to infinity.
B.
R2 score is always positive, but it ranges between 0 and 1 only.
C.
R2 score can be negative. That happens if our model is worse than the mean model.
D.
R2 score can be negative. That happens if the mean model is worse than our model.

A published solution is not available for this question yet.

Report a correction for Q258

Question 259 MCQ · 2.0 marks

Which options represent the output of the following code block?
Source diagram or notation
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 Q259

Question 260 MCQ · 2.0 marks

Consider the following code block:
Source diagram or notation
What will be the value of the ‘count’?
A.
20
B.
30
C.
45
D.
15

A published solution is not available for this question yet.

Report a correction for Q260

Question 261 MCQ · 2.0 marks

Consider the following code block:
Source diagram or notation
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 Q261

Question 262 MCQ · 2.0 marks

Which of the following is a hyperparameter?
A.
L1-ratio in elasticnet
B.
Pruning parameter in a decision tree
C.
Learning rate in SGDRegressor
D.
All of these

A published solution is not available for this question yet.

Report a correction for Q262

Question 263 MCQ · 2.0 marks

Source diagram or notation
A.
DecisionTreeClassifier
B.
RandomForestRegressor
C.
LogisticRegressor
D.
SGDRegressor

A published solution is not available for this question yet.

Report a correction for Q263

Question 264 MCQ · 2.0 marks

Consider the following code
Source diagram or notation
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 Q264

Question 265 MCQ · 2.0 marks

Consider the following code:
Source diagram or notation
A.
0.66
B.
0.72
C.
0.80
D.
1.00

A published solution is not available for this question yet.

Report a correction for Q265

Question 266 MCQ · 2.0 marks

Which of the following are correct about sklearn.svm.SVC:
Source diagram or notation
A.
It will print number of support vectors
B.
It will print an array of support vectors
C.
It will print an array of probabilities representing distance from decision boundary with each data point.
D.
It will print indices of the support vectors from the training set.

A published solution is not available for this question yet.

Report a correction for Q266

Question 267 MCQ · 2.0 marks

Source diagram or notation
A.
It will print nearest neighbours from the test point
B.
It will print indices of and distances to the neighbouring points (in training set) from test point
C.
It will print indices, distance and nearest training point from the test point
D.
It will throw an error

A published solution is not available for this question yet.

Report a correction for Q267

Question 268 MCQ · 3.0 marks

Which of the following APIs only supports conjoining transformers and estimators in series (i.e. one after another)?
A.
Pipeline
B.
ColumnTransformer
C.
FeatureUnion
D.
All of these

A published solution is not available for this question yet.

Report a correction for Q268

Question 269 MCQ · 3.0 marks

Consider the following ML task/steps for a regression dataset: 1. Read the data from a file (named ‘dataset.csv’). It has 7 columns. The last column is the target variable, all 6 features numerical. 2. Remove rows which have target values missing. 3. Fill the missing values in the features by KNN using 3 nearest neighbours. 4. Split the data into training and test sets. Take randomly the 70% of rows in the training set and the rest of them into the test set. 5. Train a simple linear regression model, with intercept, on the training set. 6. Report R2 score on the test set. Which of the following code snippets correctly accomplishes the above task? Assume necessary imports.
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
F.Source diagram or notation

A published solution is not available for this question yet.

Report a correction for Q269

Question 270 MCQ · 3.0 marks

Source diagram or notation
A.
(10, 3)
B.
(10, 7)
C.
(10, 8)
D.
(10, 10)
E.
(10, 11)

A published solution is not available for this question yet.

Report a correction for Q270

Question 271 MCQ · 3.0 marks

Consider the following statements about SGDClassifier: 1. It can be used to train a model on large dataset that doesn’t fit in main memory 2. It can emulate a KNN model 3. It can emulate a decision tree model 4. It can emulate a perceptron Choose the correction option(s)
A.
1 and 4
B.
1 and 2
C.
2 and 3
D.
3 and 4

A published solution is not available for this question yet.

Report a correction for Q271

Question 272 MCQ · 3.0 marks

Consider an image classification task: an image can have dogs, birds and trees. An image can have any combination of these three. The classifier is expected to report all these three for every sample. What kind of classification problem is this?
A.
multi-label and multiclass problem.
B.
multi-label and binary class problem.
C.
multiclass problem.
D.
binary class single label problem.

A published solution is not available for this question yet.

Report a correction for Q272

Question 273 MCQ · 3.0 marks

Consider following code snippets, assuming necessary imports.
Source diagram or notation
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 Q273

Question 274 MCQ · 3.0 marks

Which of the following options is true for the gamma parameter in a non-linear soft margin SVM?
A.
For high values of gamma, the points need to be very close to each other in order to be considered in the same class
B.
For low values of gamma, the points need to be very close to each other in order to be considered in the same class
C.
Gamma doesn’t affect the SVM model at all
D.
None of these

A published solution is not available for this question yet.

Report a correction for Q274

Question 275 MCQ · 3.0 marks

Consider the following code:
Source diagram or notation
A.
dtc1
B.
dtc2
C.
dtc3
D.
dtc4

A published solution is not available for this question yet.

Report a correction for Q275

Question 276 MCQ · 3.0 marks

Following is the code to tune the n_estimators parameter of a Bagging Classifier model.
Source diagram or notation
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 Q276

Question 277 MCQ · 4.0 marks

Consider the following code. How many DecisionTreeClassifier models will be trained internally?
Source diagram or notation
A.
20
B.
200
C.
8
D.
150
E.
15
F.
80

A published solution is not available for this question yet.

Report a correction for Q277

Question 278 MCQ · 4.0 marks

Consider two classifiers as shown in the following block of code:
Source diagram or notation
A.
depth(clf1) ≥ depth(clf2)
B.
depth(clf1) ≤ depth(clf2)
C.
depth(clf1) = depth(clf2)
D.
Insufficient Information

A published solution is not available for this question yet.

Report a correction for Q278

Question 279 MCQ · 4.0 marks

Consider the following code:
Source diagram or notation
A.
d1 < d2 < d3 < d4
B.
d1 ≤ d2 ≤ d3 ≤ d4
C.
d1 > d2 > d3 > d4
D.
d1 ≥ d2 ≥ d3 ≥ d4

A published solution is not available for this question yet.

Report a correction for Q279

Question 280 MCQ · 4.0 marks

Suppose that we have 10000 samples in a dataset. Suppose further we use the K − means algorithm to find clusters in the dataset. Then, the statement that K-Means algorithm always converges with zero inertia (or zero Sums Square Error) for some value of K is
A.
Always True
B.
Always False
C.
True, sometimes

A published solution is not available for this question yet.

Report a correction for Q280

Question 281 MCQ · 4.0 marks

Suppose that we use k-means clustering for a dataset having 100 samples. The initial centroids for k clusters can be initialized in multiple ways. One such as way is shown below
Source diagram or notation
A.
20 centroids are randomly initialized 10 times
B.
10 centroids are randomly initialized 20 times
C.
20 samples in the dataset are selected as initialization point such that they are at least 10 units away from each other
D.
10 samples in the dataset are selected as initialization point such that they are at least 20 units away from each other

A published solution is not available for this question yet.

Report a correction for Q281

Question 282 MSQ · 2.0 marks

We wish to load the wine dataset from sklearn. Which of the following will throw an error?
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 Q282

Question 283 MSQ · 2.0 marks

Which of the following is correct?
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 Q283

Question 284 MSQ · 2.0 marks

Which of the following algorithms may get impacted by feature scaling?
A.
LinearRegression
B.
DecisionTree
C.
SVM
D.
BinomialNaiveBayes

A published solution is not available for this question yet.

Report a correction for Q284

Question 285 MSQ · 2.0 marks

Which of the following class(es) is (are) used to instantiate a neural network in Sklearn.
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 Q285

Question 286 MSQ · 3.0 marks

Source diagram or notation
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 Q286

Question 287 MSQ · 3.0 marks

Which of the following ways can help in feature selection?
A.
Drop a Feature with many missing values
B.
Drop a feature containing data with high standard deviation
C.
Use SelectKBest or SelectKPercentile methods
D.
Drop a feature which has high correlation with target variable

A published solution is not available for this question yet.

Report a correction for Q287

Question 288 MSQ · 4.0 marks

Consider the following block of code:
Source diagram or notation
A.
Number of samples at node N = 15. If it is split, it will result in 9 nodes in the left child and 6 nodes in the right child.
B.
Number of samples at node N = 5. If it is split, it will result in 4 nodes in the left child and 2 nodes in the right child.
C.
Number of samples at node N = 7. If it is split, it will result in 4 nodes in the left child and 3 nodes in the right child.
D.
Number of samples at node N = 12. If it is split, it will result in 3 nodes in the left child and 9 nodes in the right child.

A published solution is not available for this question yet.

Report a correction for Q288

Question 289 MSQ · 4.0 marks

The code given below attempts to find the clusters in the dataset, X using the K-means algorithm.
Source diagram or notation
A.
The code attempts to find 2 clusters in the given dataset
B.
The dataset X can be visualized in the Euclidean space
C.
The code raises an error upon execution
D.
The code gets executed without an error upon execution

A published solution is not available for this question yet.

Report a correction for Q289

Question 290 MSQ · 4.0 marks

The following line of code creates a neural network (assume necessary imports)
Source diagram or notation
Select the correct statements from the following list of statements
A.
The neural network contains 3 hidden layers with 5 neurons in each hidden layer
B.
The neural network contains 5 hidden layers with 3 neurons in each hidden layer
C.
The neural network contains 2 hidden layers with 5 neurons in the second hidden layer
D.
The neural network contains 2 hidden layers with 3 neurons in the first hidden layer
E.
None of the given options are correct

A published solution is not available for this question yet.

Report a correction for Q290

Question 291 NAT · 3.0 marks

Consider the following code block:
Source diagram or notation

A published solution is not available for this question yet.

Report a correction for Q291