MauryaHub PYQ Practice

Machine Learning Practice · End Term · Jan 2026 · AN

Machine Learning Practice · End Term · Jan 2026 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 / 25 published solutions

Question 2 MCQ · 4.0 marks

Which variant of the Naive Bayes Classifier will be most suitable to predict the Gender in the given dataset?
Source diagram or notation
A.
CategoricalNB
B.
BernoulliNB
C.
MultinomialNB
D.
GaussianNB

A published solution is not available for this question yet.

Report a correction for Q2

Question 3 MCQ · 4.0 marks

Consider the following time series analysis code:
Source diagram or notation
In the above code, what is the primary role of the parameter d=1 in order=(1,1,1)?
A.
It controls the number of lag observations in the model
B.
It represents the number of times the data is differenced
C.
It defines the size of the moving average window
D.
It determines the forecast horizon

A published solution is not available for this question yet.

Report a correction for Q3

Question 4 MCQ · 4.0 marks

In the following question, an Assertion (A) is followed by a Reason (R). Choose the correct option from the choices given below: Assertion (A): In classification problems, precision should always be maximized over recall Reason (R): Recall is independent of false negatives
A.
Both A and R are true, and R is the correct explanation of A
B.
Both A and R are true, but R is not the correct explanation of A
C.
A is true, but R is false
D.
A is false, but R is true
E.
Both A and R are false

A published solution is not available for this question yet.

Report a correction for Q4

Question 5 MCQ · 4.0 marks

Consider the following code snippet:
Source diagram or notation
Which employees are included in filtered_df?
A.
Sara, Mike, Anna, Tom
B.
Sara, Mike, Anna
C.
Mike, Anna, Tom
D.
Sara, Anna, Tom

A published solution is not available for this question yet.

Report a correction for Q5

Question 6 NAT · 3.0 marks

What is the output of the following code? (Enter upto 2 decimals)
Source diagram or notation

A published solution is not available for this question yet.

Report a correction for Q6

Question 7 MSQ · 5.0 marks

Consider the following adaboost models:
Source diagram or notation
Which of the following statements are MOST accurate?
A.
adb1 is less likely to overfit than adb2 because its base trees are shallower.
B.
Increasing n_estimators always improves test accuracy for AdaBoost.
C.
Learning rate affects the contribution of each base learner; a smaller learning rate always reduces training accuracy.
D.
adb2 with deeper trees will have lower bias but higher variance than adb1.

A published solution is not available for this question yet.

Report a correction for Q7

Question 8 MSQ · 5.0 marks

Consider the following code snippet:
Source diagram or notation
Which of the following statements are true?
A.
If the model reaches convergence in under 20 iterations, it is guaranteed that every data point is mapped to its nearest centroid.
B.
The value for number of clusters is a hyperparameter that can be validated using a silhouette score or the elbow method.
C.
The algorithm will execute a total of 20 independent runs using different starting centroid seed
D.
The initialization process will select 9 data points entirely at random to serve as the starting centroids.

A published solution is not available for this question yet.

Report a correction for Q8

Question 9 MSQ · 5.0 marks

Consider the following Python code snippet used for basic image processing and answer the question that follows:
Source diagram or notation
Which of the following statements are False?
A.Source diagram or notation
represents an image with 3 color channels
B.
The maximum possible pixel intensity value in
Source diagram or notation
is 256
C.
The resize operation applied to
Source diagram or notation
reduces the number of channels
D.Source diagram or notation
is obtained by flipping
Source diagram or notation
from Left to Right

A published solution is not available for this question yet.

Report a correction for Q9

Question 10 MSQ · 5.0 marks

Identify which of the following lines (marked in comments) contain errors in the given code snippet:
Source diagram or notation
A.
Line1
B.
Line2
C.
Line3
D.
Line4

A published solution is not available for this question yet.

Report a correction for Q10

Question 11 NAT · 4.0 marks

Consider the following code snippet:
Source diagram or notation
What is the predicted class for the test datapoint?

A published solution is not available for this question yet.

Report a correction for Q11

Question 12 NAT · 4.0 marks

Consider the following code snippet and answer the question that follows:
Source diagram or notation
Enter the value obtained as output

A published solution is not available for this question yet.

Report a correction for Q12

Question 13 NAT · 4.0 marks

Consider the following lists containing the true values and the predicted values.
Source diagram or notation
Calculate the f1_score for class 1. (Answer up to 2 decimals)

A published solution is not available for this question yet.

Report a correction for Q13

Question 14 NAT · 5.0 marks

Consider the following code snippet for a multi-class classification problem with three classes: 0, 1, and 2. The ground-truth labels are stored in
Source diagram or notation
, and the predicted labels are stored in
Source diagram or notation
.
Source diagram or notation
What is the precision score for class 1?

A published solution is not available for this question yet.

Report a correction for Q14

Question 15 MSQ · 3.0 marks

Which of the following transformations are commonly used as Data Augmentation techniques?
A.
Random cropping of images during training
B.
Normalizing pixel values to the range of [0,1]
C.
Resizing all images to a fixed resolution
D.
Rotation of images with a small angle range

A published solution is not available for this question yet.

Report a correction for Q15

Question 16 MSQ · 3.0 marks

Analyze the following code snippet:
Source diagram or notation
Which of the following statements are correct?
A.
mlp2 has more trainable parameters than mlp1.
B.
Changing random_state may change predictions even with the same dataset.
C.
Using 'sgd' solver always gives higher accuracy than 'adam'.
D.
'tanh' activation guarantees better performance than 'relu'.

A published solution is not available for this question yet.

Report a correction for Q16

Question 17 MSQ · 4.0 marks

Which of the following statements regarding Tfidf Vectorizer is true?
A.
Setting
Source diagram or notation
ensures that a term appearing in all documents will have an IDF value equal to zero
B.
Setting
Source diagram or notation
creates an additional copy of each token in lowercase in the vocabulary
C.
Setting
Source diagram or notation
ensures that only the 1000 most frequent terms are kept in the vocabulary
D.
Setting
Source diagram or notation
will lead to terms with document frequency strictly lesser than 3 being ignored while building vocabulary

A published solution is not available for this question yet.

Report a correction for Q17

Question 18 MSQ · 4.0 marks

Consider the following code snippet:
Source diagram or notation
Identify the correct code snippet/s to retrive only employees from departments where the average salary > 65000.
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 Q18

Question 19 MSQ · 4.0 marks

Select all the false statements amongst the given statements:
A.
RandomForest uses sampling without replacement for bagging.
B.
Boosting reduces bias by sequentially training models
C.
Bagging reduces bias by training multiple models on different subsets of data and averaging their predictions.
D.
Boosting trains all base models independently in parallel.

A published solution is not available for this question yet.

Report a correction for Q19

Question 20 MCQ · 3.0 marks

Which of the following implementations of LogisticRgression cannot be used to tackle multinomial multiclass problems?
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 Q20

Question 21 MCQ · 3.0 marks

What is the range of the metric that is being calculated by the following code snippet?
Source diagram or notation
A.
0 to 1
B.Source diagram or notation
C.
-1 to 1
D.Source diagram or notation

A published solution is not available for this question yet.

Report a correction for Q21

Question 22 MCQ · 3.0 marks

Consider the following cross validation strategy:
Source diagram or notation
What does the above mentioned cross val strategy do?
A.
LOOCV will train the model 5 times.
B.
LOOCV will train the model 1 time.
C.
The code is wrong

A published solution is not available for this question yet.

Report a correction for Q22

Question 23 MCQ · 3.0 marks

Consider the given 2 different lasso regression models trained on the same dataset:
Source diagram or notation
Statements: 1. The coefficients of lasso2 are more likely to be smaller in magnitude than those of lasso1. 2. lasso1 may have fewer zero coefficients than lasso2. 3. The predictions of lasso1 on the training data will exactly match y. 4. Increasing alpha always increases model accuracy on unseen data. Which of the given statements are correct?
A.
2 and 3
B.
1 and 2
C.
3 and 4
D.
1 and 4

A published solution is not available for this question yet.

Report a correction for Q23

Question 24 NAT · 5.0 marks

Consider the following dataset X with 6 samples and 3 features and answer the given subquestions.
Source diagram or notation
What is the sum of all values of the first column of
Source diagram or notation
? (Round off to two decimal places)

A published solution is not available for this question yet.

Report a correction for Q24

Question 25 NAT · 4.0 marks

Consider the following dataset X with 6 samples and 3 features and answer the given subquestions.
Source diagram or notation
What is the output obtained while running
Source diagram or notation
?

A published solution is not available for this question yet.

Report a correction for Q25

Question 26 MCQ · 5.0 marks

We create the following ml pipeline:
Source diagram or notation
Which of the following statements is true?
A.
RandomizedSearchCV tries all possible combinations of hyperparameters in param_dist.
B.
Only 4 random combinations of hyperparameters will be tested.
C.
Changing random_state has no effect on the hyperparameter search results.
D.
Changing cv to 8 will be computationally cheaper.

A published solution is not available for this question yet.

Report a correction for Q26