ML Study Hub

Home / Past papers / MLP End Term / this paper

Machine Learning Practice 06 May 26 - 10 May 2026

MLP End Term25 questions100 marks9 MCQ · 9 MSQ · 7 SA
Elapsed 00:00
Q1MCQ4 marks
Which variant of the Naive Bayes Classifier will be most suitable to predict the Gender in the given dataset? question figure
  1. CategoricalNB
  2. BernoulliNB
  3. MultinomialNB
  4. GaussianNB
Q2MCQ4 marks
Consider the following time series analysis code: question figure In the above code, what is the primary role of the parameter d=1 in order=(1,1,1)?
  1. It controls the number of lag observations in the model
  2. It represents the number of times the data is differenced
  3. It defines the size of the moving average window
  4. It determines the forecast horizon
Q3MCQ4 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
  1. Both A and R are true, and R is the correct explanation of A
  2. Both A and R are true, but R is not the correct explanation of A
  3. A is true, but R is false
  4. A is false, but R is true
  5. Both A and R are false
Q4MCQ4 marks
Consider the following code snippet: question figure Which employees are included in filtered_df?
  1. Sara, Mike, Anna, Tom
  2. Sara, Mike, Anna
  3. Mike, Anna, Tom
  4. Sara, Anna, Tom
Q5SA3 marks
What is the output of the following code? (Enter upto 2 decimals) question figure
Q6MSQ5 marksselect all that apply
Consider the following adaboost models: question figure Which of the following statements are MOST accurate?
  1. adb1 is less likely to overfit than adb2 because its base trees are shallower.
  2. Increasing n_estimators always improves test accuracy for AdaBoost.
  3. Learning rate affects the contribution of each base learner; a smaller learning rate always reduces training accuracy.
  4. adb2 with deeper trees will have lower bias but higher variance than adb1.
Q7MSQ5 marksselect all that apply
Consider the following code snippet: question figure Which of the following statements are true?
  1. If the model reaches convergence in under 20 iterations, it is guaranteed that every data point is mapped to its nearest centroid.
  2. The value for number of clusters is a hyperparameter that can be validated using a silhouette score or the elbow method.
  3. The algorithm will execute a total of 20 independent runs using different starting centroid seed
  4. The initialization process will select 9 data points entirely at random to serve as the starting centroids.
Q8MSQ5 marksselect all that apply
Consider the following Python code snippet used for basic image processing and answer the question that follows: question figure Which of the following statements are False?
  1. represents an image with 3 color channels
  2. The maximum possible pixel intensity value in is 256
  3. The resize operation applied to reduces the number of channels
  4. is obtained by flipping from Left to Right
Q9MSQ5 marksselect all that apply
Identify which of the following lines (marked in comments) contain errors in the given code snippet: question figure
  1. Line1
  2. Line2
  3. Line3
  4. Line4
Q10SA4 marks
Consider the following code snippet: question figure What is the predicted class for the test datapoint?
Q11SA4 marks
Consider the following code snippet and answer the question that follows: question figure Enter the value obtained as output
Q12SA4 marks
Consider the following lists containing the true values and the predicted values. question figure Calculate the f1_score for class 1. (Answer up to 2 decimals)
Q13SA5 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 , and the predicted labels are stored in . question figure What is the precision score for class 1?
Q14MSQ3 marksselect all that apply
Which of the following transformations are commonly used as Data Augmentation techniques?
  1. Random cropping of images during training
  2. Normalizing pixel values to the range of [0,1]
  3. Resizing all images to a fixed resolution
  4. Rotation of images with a small angle range
Q15MSQ3 marksselect all that apply
Analyze the following code snippet: question figure Which of the following statements are correct?
  1. mlp2 has more trainable parameters than mlp1.
  2. Changing random_state may change predictions even with the same dataset.
  3. Using 'sgd' solver always gives higher accuracy than 'adam'.
  4. 'tanh' activation guarantees better performance than 'relu'.
Q16MSQ4 marksselect all that apply
Which of the following statements regarding Tfidf Vectorizer is true?
  1. Setting ensures that a term appearing in all documents will have an IDF value equal to zero
  2. Setting creates an additional copy of each token in lowercase in the vocabulary
  3. Setting ensures that only the 1000 most frequent terms are kept in the vocabulary
  4. Setting will lead to terms with document frequency strictly lesser than 3 being ignored while building vocabulary
Q17MSQ4 marksselect all that apply
Consider the following code snippet: question figure Identify the correct code snippet/s to retrive only employees from departments where the average salary > 65000.
  1. question figure
  2. question figure
  3. question figure
  4. question figure
Q18MSQ4 marksselect all that apply
Select all the false statements amongst the given statements:
  1. RandomForest uses sampling without replacement for bagging.
  2. Boosting reduces bias by sequentially training models
  3. Bagging reduces bias by training multiple models on different subsets of data and averaging their predictions.
  4. Boosting trains all base models independently in parallel.
Q19MCQ3 marks
Which of the following implementations of LogisticRgression cannot be used to tackle multinomial multiclass problems?
  1. question figure
  2. question figure
  3. question figure
  4. question figure
Q20MCQ3 marks
What is the range of the metric that is being calculated by the following code snippet? question figure
  1. 0 to 1
  2. -1 to 1
Q21MCQ3 marks
Consider the following cross validation strategy: question figure What does the above mentioned cross val strategy do?
  1. LOOCV will train the model 5 times.
  2. LOOCV will train the model 1 time.
  3. The code is wrong
Q22MCQ3 marks
Consider the given 2 different lasso regression models trained on the same dataset: question figure 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?
  1. 2 and 3
  2. 1 and 2
  3. 3 and 4
  4. 1 and 4
Comprehension passage - the questions below it refer to this
Consider the following dataset X with 6 samples and 3 features and answer the given subquestions. question figure
Q23SA5 marks
What is the sum of all values of the first column of ? (Round off to two decimal places)
Q24SA4 marks
What is the output obtained while running ?
Q25MCQ5 marks
We create the following ml pipeline: question figure Which of the following statements is true?
  1. RandomizedSearchCV tries all possible combinations of hyperparameters in param_dist.
  2. Only 4 random combinations of hyperparameters will be tested.
  3. Changing random_state has no effect on the hyperparameter search results.
  4. Changing cv to 8 will be computationally cheaper.

Answer key

  1. Q1 (MCQ, 4 marks): D
  2. Q2 (MCQ, 4 marks): B
  3. Q3 (MCQ, 4 marks): E
  4. Q4 (MCQ, 4 marks): A
  5. Q5 (SA, 3 marks): 310 to 315
  6. Q6 (MSQ, 5 marks): A, D
  7. Q7 (MSQ, 5 marks): A, B
  8. Q8 (MSQ, 5 marks): B, C, D
  9. Q9 (MSQ, 5 marks): A, C, D
  10. Q10 (SA, 4 marks): 0
  11. Q11 (SA, 4 marks): 6
  12. Q12 (SA, 4 marks): 0.71 to 0.74
  13. Q13 (SA, 5 marks): 0.50
  14. Q14 (MSQ, 3 marks): A, D
  15. Q15 (MSQ, 3 marks): A, B
  16. Q16 (MSQ, 4 marks): C, D
  17. Q17 (MSQ, 4 marks): A, D
  18. Q18 (MSQ, 4 marks): A, C, D
  19. Q19 (MCQ, 3 marks): A
  20. Q20 (MCQ, 3 marks): B
  21. Q21 (MCQ, 3 marks): A
  22. Q22 (MCQ, 3 marks): B
  23. Q23 (SA, 5 marks): -0.46 to -0.44
  24. Q24 (SA, 4 marks): 1
  25. Q25 (MCQ, 5 marks): B