uiz Space

January 2026 term · Machine Learning Practice · BSCS2008

Machine Learning Practice End Term: 10 May 2026 (January 2026 term)

The IIT Madras BS Machine Learning Practice (MLP) End Term paper sat on 10 May 2026, in the January 2026 term: 26 questions for 101 marks in 180 minutes. Every question is below with its answer. Take it as a timed mock test to be marked, or read it through first.

Questions
26
Marks
101
Duration
180 min
MCQ
9
Written
8
MSQ
9

Updated

Official paper: Machine Learning Practice 06 May 26 · No negative marking.

Question 1

+4 marksOne correct option

Which variant of the Naive Bayes Classifier will be most suitable to predict the Gender in the given dataset?

Which variant of the Naive Bayes Classifier will be most suitable to predict the Gender in the given dataset?
  1. A

    CategoricalNB

  2. B

    BernoulliNB

  3. C

    MultinomialNB

  4. D

    GaussianNB

Show answer

Correct answer

  • D

    GaussianNB

Question 2

+4 marksOne correct option

Consider the following time series analysis code:

In the above code, what is the primary role of the parameter d=1 in order=(1,1,1)?

Consider the following time series analysis code:
  1. A

    It controls the number of lag observations in the model

  2. B

    It represents the number of times the data is differenced

  3. C

    It defines the size of the moving average window

  4. D

    It determines the forecast horizon

Show answer

Correct answer

  • B

    It represents the number of times the data is differenced

Question 3

+4 marksOne correct option

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

  1. A

    Both A and R are true, and R is the correct explanation of A

  2. B

    Both A and R are true, but R is not the correct explanation of A

  3. C

    A is true, but R is false

  4. D

    A is false, but R is true

  5. E

    Both A and R are false

Show answer

Correct answer

  • E

    Both A and R are false

Question 4

+4 marksOne correct option

Consider the following code snippet:

Which employees are included in filtered_df?

Consider the following code snippet:
  1. A

    Sara, Mike, Anna, Tom

  2. B

    Sara, Mike, Anna

  3. C

    Mike, Anna, Tom

  4. D

    Sara, Anna, Tom

Show answer

Correct answer

  • A

    Sara, Mike, Anna, Tom

Question 5

+3 marksWritten answer

What is the output of the following code? (Enter upto 2 decimals)

What is the output of the following code? (Enter upto 2 decimals)
Show answer

A written answer, not marked automatically.

Question 6

+5 marksOne or more correct options

Consider the following adaboost models:

Which of the following statements are MOST accurate?

Consider the following adaboost models:

Select all that apply.

  1. A

    adb1 is less likely to overfit than adb2 because its base trees are shallower.

  2. B

    Increasing n_estimators always improves test accuracy for AdaBoost.

  3. C

    Learning rate affects the contribution of each base learner; a smaller learning rate always reduces training accuracy.

  4. D

    adb2 with deeper trees will have lower bias but higher variance than adb1.

Show answer

Correct answers

  • A

    adb1 is less likely to overfit than adb2 because its base trees are shallower.

  • D

    adb2 with deeper trees will have lower bias but higher variance than adb1.

Question 7

+5 marksOne or more correct options

Consider the following code snippet:

Which of the following statements are true?

Consider the following code snippet:

Select all that apply.

  1. A

    If the model reaches convergence in under 20 iterations, it is guaranteed that every data point is mapped to its nearest centroid.

  2. B

    The value for number of clusters is a hyperparameter that can be validated using a silhouette score or the elbow method.

  3. C

    The algorithm will execute a total of 20 independent runs using different starting centroid seed

  4. D

    The initialization process will select 9 data points entirely at random to serve as the starting centroids.

Show answer

Correct answers

  • 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.

Question 8

+5 marksOne or more correct options

Consider the following Python code snippet used for basic image processing and answer the question that follows:

Which of the following statements are False?

Consider the following Python code snippet used for basic image processing and answer the question that follows:

Select all that apply.

  1. A

    represents an image with 3 color channels

  2. B

    The maximum possible pixel intensity value in is 256

  3. C

    The resize operation applied to reduces the number of channels

  4. D

    is obtained by flipping from Left to Right

Show answer

Correct answers

  • B

    The maximum possible pixel intensity value in is 256

  • C

    The resize operation applied to reduces the number of channels

  • D

    is obtained by flipping from Left to Right

Question 9

+5 marksOne or more correct options

Identify which of the following lines (marked in comments) contain errors in the given code snippet:

Identify which of the following lines (marked in comments) contain errors in the given code snippet:

Select all that apply.

  1. A

    Line1

  2. B

    Line2

  3. C

    Line3

  4. D

    Line4

Show answer

Correct answers

  • A

    Line1

  • C

    Line3

  • D

    Line4

Question 10

+4 marksWritten answer

Consider the following code snippet:

What is the predicted class for the test datapoint?

Consider the following code snippet:
Show answer

A written answer, not marked automatically.

Question 11

+4 marksWritten answer

Consider the following code snippet and answer the question that follows:

Enter the value obtained as output

Consider the following code snippet and answer the question that follows:
Show answer

A written answer, not marked automatically.

Question 12

+4 marksWritten answer

Consider the following lists containing the true values and the predicted values.

Calculate the f1_score for class 1. (Answer up to 2 decimals)

Consider the following lists containing the true values and the predicted values.
Show answer

A written answer, not marked automatically.

Question 13

+5 marksWritten answer

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 , and the predicted labels are stored in .

What is the precision score for class 1?

Consider the following code snippet for a multi-class classification problem with three classes: 0, 1, and 2. The ground
Show answer

A written answer, not marked automatically.

Question 14

+3 marksOne or more correct options

Which of the following transformations are commonly used as Data Augmentation techniques?

Select all that apply.

  1. A

    Random cropping of images during training

  2. B

    Normalizing pixel values to the range of [0,1]

  3. C

    Resizing all images to a fixed resolution

  4. D

    Rotation of images with a small angle range

Show answer

Correct answers

  • A

    Random cropping of images during training

  • D

    Rotation of images with a small angle range

Question 15

+3 marksOne or more correct options

Analyze the following code snippet:

Which of the following statements are correct?

Analyze the following code snippet:

Select all that apply.

  1. A

    mlp2 has more trainable parameters than mlp1.

  2. B

    Changing random_state may change predictions even with the same dataset.

  3. C

    Using 'sgd' solver always gives higher accuracy than 'adam'.

  4. D

    'tanh' activation guarantees better performance than 'relu'.

Show answer

Correct answers

  • A

    mlp2 has more trainable parameters than mlp1.

  • B

    Changing random_state may change predictions even with the same dataset.

Question 16

+4 marksOne or more correct options

Which of the following statements regarding Tfidf Vectorizer is true?

Select all that apply.

  1. A

    Setting ensures that a term appearing in all documents will have an IDF value equal to zero

  2. B

    Setting creates an additional copy of each token in lowercase in the vocabulary

  3. C

    Setting ensures that only the 1000 most frequent terms are kept in the vocabulary

  4. D

    Setting will lead to terms with document frequency strictly lesser than 3 being ignored while building vocabulary

Show answer

Correct answers

  • C

    Setting ensures that only the 1000 most frequent terms are kept in the vocabulary

  • D

    Setting will lead to terms with document frequency strictly lesser than 3 being ignored while building vocabulary

Question 17

+4 marksOne or more correct options

Consider the following code snippet:

Identify the correct code snippet/s to retrive only employees from departments where the average salary > 65000.

Consider the following code snippet:

Select all that apply.

  1. A
    Figure from the original question paper
  2. B
    Figure from the original question paper
  3. C
    Figure from the original question paper
  4. D
    Figure from the original question paper
Show answer

Correct answers

  • A
    Figure from the original question paper
  • D
    Figure from the original question paper

Question 18

+4 marksOne or more correct options

Select all the false statements amongst the given statements:

Select all that apply.

  1. A

    RandomForest uses sampling without replacement for bagging.

  2. B

    Boosting reduces bias by sequentially training models

  3. C

    Bagging reduces bias by training multiple models on different subsets of data and averaging their predictions.

  4. D

    Boosting trains all base models independently in parallel.

Show answer

Correct answers

  • A

    RandomForest uses sampling without replacement for bagging.

  • 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.

Question 19

+3 marksOne correct option

Which of the following implementations of LogisticRgression cannot be used to tackle multinomial multiclass problems?

  1. A
    Figure from the original question paper
  2. B
    Figure from the original question paper
  3. C
    Figure from the original question paper
  4. D
    Figure from the original question paper
Show answer

Correct answer

  • A
    Figure from the original question paper

Question 20

+3 marksOne correct option

What is the range of the metric that is being calculated by the following code snippet?

What is the range of the metric that is being calculated by the following code snippet?
  1. A

    0 to 1

  2. B

    —

  3. C

    -1 to 1

  4. D

    —

Show answer

Correct answer

  • B

    —

Question 21

+3 marksOne correct option

Consider the following cross validation strategy:

What does the above mentioned cross val strategy do?

Consider the following cross validation strategy:
  1. A

    LOOCV will train the model 5 times.

  2. B

    LOOCV will train the model 1 time.

  3. C

    The code is wrong

Show answer

Correct answer

  • A

    LOOCV will train the model 5 times.

Question 22

+3 marksOne correct option

Consider the given 2 different lasso regression models trained on the same dataset:

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?

Consider the given 2 different lasso regression models trained on the same dataset:
  1. A

    2 and 3

  2. B

    1 and 2

  3. C

    3 and 4

  4. D

    1 and 4

Show answer

Correct answer

  • B

    1 and 2

Question 23

+5 marksWritten answer

Consider the following dataset X with 6 samples and 3 features and answer the given subquestions.

Consider the following dataset X with 6 samples and 3 features and answer the given subquestions.

What is the sum of all values of the first column of ? (Round off to two decimal places)

Show answer

A written answer, not marked automatically.

Question 24

+4 marksWritten answer

Consider the following dataset X with 6 samples and 3 features and answer the given subquestions.

Consider the following dataset X with 6 samples and 3 features and answer the given subquestions.

What is the output obtained while running ?

Show answer

A written answer, not marked automatically.

Question 25

+5 marksOne correct option

We create the following ml pipeline:

Which of the following statements is true?

We create the following ml pipeline:
  1. A

    RandomizedSearchCV tries all possible combinations of hyperparameters in param_dist.

  2. B

    Only 4 random combinations of hyperparameters will be tested.

  3. C

    Changing random_state has no effect on the hyperparameter search results.

  4. D

    Changing cv to 8 will be computationally cheaper.

Show answer

Correct answer

  • B

    Only 4 random combinations of hyperparameters will be tested.

Question 26

+1 markWritten answer

Consider the following dataset X with 6 samples and 3 features and answer the given subquestions.

Consider the following dataset X with 6 samples and 3 features and answer the given subquestions.
Show answer

A written answer, not marked automatically.