ML Study Hub

Home / Past papers / MLP End Term / this paper

IIT M FOUNDATION DIPLOMA ENDTERM QPB1 07 Aug 2022 - 07 Aug 2022

MLP End Term41 questions100 marks32 MCQ · 5 MSQ · 4 SAFoundation / Diploma / QPB1
Elapsed 00:00
Q1MCQ0 marks
question figure
  1. Yes
  2. No
Q2MCQ2 marks
The similarity between loaders and fetchers of sklearn is -
  1. Both loaders and fetchers generate controlled synthetic datasets
  2. Both loaders and fetchers return a Bunch object, which is a dictionary with twokeys
  3. Both techniques load small standard datasets
  4. None of these options are correct
Q3MCQ2 marks
Which of the following options represent the main purpose of using the FeatureUnion?
  1. Enables different transformations on various columns of data based on theirtypes
  2. Combines output from several transformer objects by creating a newtransformer from them
  3. To chain multiple estimators to execute a fixed sequence of steps in datapreprocessing and modeling
  4. None of these
Q4MCQ2 marks
What will be the output of the following block of code? question figure What will be the output of the following block of code?
  1. (10, 2)
  2. (2, 10)
  3. (10, 3)
  4. (3, 10)
Q5MCQ2 marks
Which of the following options is the correct method to load the wine dataset and print its shape?
  1. question figure
  2. question figure
  3. question figure
  4. question figure
Q6MCQ2 marks
What is the output of the following block of code? question figure What is the output of the following block of code?
  1. question figure
  2. question figure
  3. question figure
  4. question figure
Q7MCQ2 marks
What is the output of the following code snippet? question figure What is the output of the following code snippet?
  1. [0.75 0.5]
  2. [0.25 0.5]
  3. [0.5 0.75]
  4. [0.5 0.5]
Q8MCQ2 marks
Which of the options will be the correct output for the following code snippet? question figure Which of the options will be the correct output for the following code snippet?
  1. question figure
  2. question figure
  3. question figure
  4. question figure
Q9MCQ2 marks
Which of the options will be the correct output for the following code snippet? question figure Which of the options will be the correct output for the following code snippet?
  1. question figure
  2. question figure
  3. question figure
  4. question figure
Q10MCQ2 marks
Which of the following options is correct explained variance score for the following code snippet applying PCA technique. question figure Which of the following options is correct explained variance score for the following code snippet applying PCA technique.
  1. [1. 1.]
  2. [1. 0.]
  3. [0. 1.]
  4. [0. 0.]
Q11MCQ2 marks
Which of the following options is the correct output of the following block of code? question figure Which of the following options is the correct output of the following block of code?
  1. question figure
  2. question figure
  3. question figure
  4. question figure
Q12MCQ2 marks
Which of the following options is the correct method to shuffle training data after each epoch in SGDRegressor?
  1. question figure
  2. question figure
  3. question figure
  4. question figure
Q13MCQ2 marks
Which of the following options represent the correct output of the following block of code? question figure Which of the following options represent the correct output of the following block of code?
  1. array([9.])
  2. array([10.])
  3. array([11.])
  4. SyntaxError: unexpected EOF while parsing
Q14MCQ2 marks
question figure
  1. question figure
  2. question figure
  3. question figure
  4. question figure
Q15MCQ2 marks
Which of the following options is the possible output for the following block of code? question figure Which of the following options is the possible output for the following block of code?
  1. 0.94
  2. 1.25
  3. 1.94
  4. -2.64
Q16MCQ2 marks
What operation does the following code implement? question figure What operation does the following code implement?
  1. It will perform linear regression on the given data.
  2. It will generate synthetic regression data.
  3. It will generate synthetic classification data.
  4. It will perform classification on the given data.
Q17MCQ2 marks
Which of the following options represent the recall value for the class 2 in the confusion matrix shown in Figure 1 if y_true = [0, 1, 2, 2, 2], y_pred = [0, 0, 2, 2, 1] ? question figure Which of the following options represent the recall value for the class 2 in the confusion matrix shown in Figure 1 if y_true = [0, 1, 2, 2, 2], y_pred = [0, 0, 2, 2, 1] ?
  1. 0.67
  2. 1.00
  3. 0.50
  4. 0.25
Q18MCQ2 marks
Consider the following code block and mark the correct output. question figure Consider the following code block and mark the correct output.
  1. [0 0 0 1 1 1]
  2. [2 2 0 0 1 1]
  3. [0 1 2 0 1 2]
  4. [0 1 0 1 0 1]
Q19MCQ2 marks
Consider X and y as the training dataset. What will be the output of the following code? question figure Consider X and y as the training dataset. What will be the output of the following code?
  1. logistic
  2. relu
  3. identity
  4. softmax
Q20MSQ2 marksselect all that apply
Which of the following options represent the design philosophy of the sklearn API?
  1. Nonproliferation of classes
  2. Execution of all codes within 99.9 ms.
  3. Sensible defaults
  4. Direct accessibility of hyperparameters of all estimators
Q21MSQ2 marksselect all that apply
Which of the following options represent(s) the correct method(s) to search for the best regularization parameter for ridge regression?
  1. Search for the best regularization rate with built-in cross validation in RidgeCVestimator
  2. Step 1: Instantiate object of Ridge estimator.Step 2: Set parameter alpha to the maximum regularization rate.
  3. Use cross validation with Ridge to search for best regularization.
  4. Apply cross validation with SGDRegressor for searching the best regularizationparameter.
Q22MSQ2 marksselect all that apply
Consider the following block of code and mark all possible correct options. question figure Consider the following block of code and mark all possible correct options.
  1. Given model uses majority voting rule to predict class labels.
  2. Given model predicts the class labels based on the argmax of the sums of thepredicted probabilities.
  3. Setting flatten_transform =True with voting=’soft’ will flatten the output shapeof transform.
  4. None of these are correct
Q23MCQ3 marks
What will be the output of the following code block: question figure What will be the output of the following code block:
  1. question figure
  2. question figure
  3. question figure
  4. question figure
Q24MCQ3 marks
Which of the following options represent the output of the following block of code? question figure Which of the following options represent the output of the following block of code?
  1. question figure
  2. question figure
  3. question figure
  4. question figure
Q25MCQ3 marks
Which of the following statements will be true based on the following diagram? question figure Which of the following statements will be true based on the following diagram?
  1. The classifier will predict all positive classes as negatives and all negativeclasses as positives.
  2. The classifier will perfectly distinguish between the positive and negativeclasses.
  3. There is a good probability that the classifier can properly identify the classes.
  4. We can not comment on the classifier performance based on the given figure
Q26MCQ3 marks
Which of the following options is the correct output of the following block of code? question figure Which of the following options is the correct output of the following block of code?
  1. array([2.25, 2.25, 2.25])
  2. array([1., 1., 1.])
  3. array([2., 2., 2.])
  4. DummyRegressor()
Q27MCQ3 marks
Which of the following is likely to be the correct output of the code given below? question figure Which of the following is likely to be the correct output of the code given below?
  1. array([[1., 1., 1., 0.], [1., 1., 1., 0.], [0., 1., 0., 1.], [0., 1., 1., 1.]])
  2. array([[1., 1., 1., 0.], [1., 1., 1., 0.], [0., 1., 0., 1.], [0., 1., 0., 1.]])
  3. array([[1., 1., 0., 1.], [0., 1., 1., 0.], [0., 1., 1., 0.], [1., 0., 1., 1.]])
  4. array([[1., 1., 1., 0.], [1., 1., 1., 0.], [0., 1., 1., 1.], [0., 1., 1., 1.]])
Q28MCQ3 marks
For the following block of code, we get the output as 0.9875. How would the output change if we decrease max depth value ?: question figure For the following block of code, we get the output as 0.9875. How would the output change if we decrease max depth value ?:
  1. Output score will definitely increase.
  2. Output score will definitely decrease.
  3. Output score may decrease or remain the same.
  4. Code will throw an error because max_depth can’t be less than 6.
Q29MCQ3 marks
Consider the following block of code and mark the correct option. question figure Consider the following block of code and mark the correct option.
  1. The minimum number of samples required to split a leaf node is 5.
  2. The minimum number of samples required to split an internal node is 6.
  3. The minimum number of samples required to be at a leaf node is 4.
  4. The minimum number of samples required to split an internal node is 5.
Q30MCQ3 marks
Consider the following code snippet. What value should we fill at the blank place, so that given code block creates graph as shown below: question figure Consider the following code snippet. What value should we fill at the blank place, so that given code block creates graph as shown below:
  1. 2
  2. 4
  3. 5
  4. 6
  5. 10
Q31SA3 marks
Calculate the coefficient of determination (R2) [up to 1 decimal point] based on the following block of code. question figure Calculate the coefficient of determination (R2) [up to 1 decimal point] based on the following block of code.
Q32SA3 marks
In the given block of code, the Iris dataset having shape (150,4) has been loaded for model training. What do you think will be the output of the code given below? question figure In the given block of code, the Iris dataset having shape (150,4) has been loaded for model training. What do you think will be the output of the code given below?
Q33SA3 marks
Code snippet written below plots a graph for some dataset X as shown below. question figure Code snippet written below plots a graph for some dataset X as shown below. In the given dendrogram which sample is most similar to the sample having label as 1 ?
Comprehension passage - the questions below it refer to this
question figure
Q34MCQ3 marks
Which of the following is likely to be the correct output of the given code ?
  1. [2]
  2. [0]
  3. [1]
  4. [3]
Q35MCQ2 marks
Which of the following distance metrics is used in the given code.
  1. Euclidean_distance
  2. Manhattan_distance
  3. Hamming Distance
  4. None of these
Comprehension passage - the questions below it refer to this
Based on the above data, answer the given subquestions. question figure
Q36SA2 marks
What will be the output of the following code? question figure What will be the output of the following code?
Q37MCQ3 marks
What will be the output of the following code? question figure What will be the output of the following code?
  1. (5, 12)
  2. (6, 11)
  3. (8, 15)
  4. (12, 8)
Comprehension passage - the questions below it refer to this
question figure
Q38MCQ3 marks
Which of the following is likely to be the correct output of the given code ?
  1. [3]
  2. [-1]
  3. [1]
  4. [-3]
Q39MCQ3 marks
Which of the following is likely to be the correct output: question figure Which of the following is likely to be the correct output:
  1. array([[-8., -3.], [ 3., 3.]])
  2. array([[-4., -3.], [ 3., 3.]])
  3. array([[-4., -3.], [ 5., 3.]])
  4. array([[-8., -3.], [ 5., 3.]])
Q40MSQ4 marksselect all that apply
Which of the following is/are true about the following block of the code? question figure Which of the following is/are true about the following block of the code?
  1. Given dataset belongs to binary classification.
  2. Number of neurons in the 1st hidden layer is 8.
  3. Strength of the L1 regularization term is 0.0001
  4. The activation function for the output layer in the given code is the ′logistic′function.
Q41MSQ5 marksselect all that apply
Which of the following code blocks will throw an error ?
  1. question figure
  2. question figure
  3. question figure
  4. question figure

Answer key

  1. Q1 (MCQ, 0 marks): A
  2. Q2 (MCQ, 2 marks): B
  3. Q3 (MCQ, 2 marks): B
  4. Q4 (MCQ, 2 marks): A
  5. Q5 (MCQ, 2 marks): D
  6. Q6 (MCQ, 2 marks): A
  7. Q7 (MCQ, 2 marks): C
  8. Q8 (MCQ, 2 marks): D
  9. Q9 (MCQ, 2 marks): D
  10. Q10 (MCQ, 2 marks): B
  11. Q11 (MCQ, 2 marks): A
  12. Q12 (MCQ, 2 marks): A
  13. Q13 (MCQ, 2 marks): B
  14. Q14 (MCQ, 2 marks): C
  15. Q15 (MCQ, 2 marks): A
  16. Q16 (MCQ, 2 marks): D
  17. Q17 (MCQ, 2 marks): A
  18. Q18 (MCQ, 2 marks): B
  19. Q19 (MCQ, 2 marks): D
  20. Q20 (MSQ, 2 marks): A, C, D
  21. Q21 (MSQ, 2 marks): A, C, D
  22. Q22 (MSQ, 2 marks): A, C
  23. Q23 (MCQ, 3 marks): A
  24. Q24 (MCQ, 3 marks): A
  25. Q25 (MCQ, 3 marks): B
  26. Q26 (MCQ, 3 marks): C
  27. Q27 (MCQ, 3 marks): D
  28. Q28 (MCQ, 3 marks): C
  29. Q29 (MCQ, 3 marks): D
  30. Q30 (MCQ, 3 marks): C
  31. Q31 (SA, 3 marks): -0.05 to 0.05
  32. Q32 (SA, 3 marks): 4
  33. Q33 (SA, 3 marks): 0
  34. Q34 (MCQ, 3 marks): C
  35. Q35 (MCQ, 2 marks): A
  36. Q36 (SA, 2 marks): 8
  37. Q37 (MCQ, 3 marks): D
  38. Q38 (MCQ, 3 marks): D
  39. Q39 (MCQ, 3 marks): B
  40. Q40 (MSQ, 4 marks): A, B, D
  41. Q41 (MSQ, 5 marks): B, C