ML Study Hub

Home / Past papers / MLP End Term / this paper

2023 Dec24: IIT M FN EXAM FDD2 - 24 Dec 2023

MLP End Term38 questions100 marks22 MCQ · 11 MSQ · 5 SAforenoon
Elapsed 00:00
Q1MCQ2 marks
Consider the following Python code using Pandas: question figure Consider the following Python code using Pandas: What does the groupby operation in the code achieve?
  1. It calculates the total price for each category.
  2. It calculates the average price for each category.
  3. It groups the data by the ’Category’ column.
  4. It filters out rows where the ’Price’ column is zero.
Q2MCQ2 marks
question figure
  1. question figure
  2. question figure
  3. question figure
  4. question figure
Q3MCQ2 marks
Which of the following metrics indicate higher their value, better the regression model’s performance?
  1. RMSE
  2. R2
  3. Mean absolute error
  4. Mean squared error
Q4MCQ2 marks
Which of the following variations of gradient descent can be implemented with SGDClassifier?
  1. stochastic gradient descent
  2. mini gradient descent
  3. full batch gradient descent
  4. None of these
Q5MCQ2 marks
Consider the Ridge regression model in scikit-learn, represented by the Ridge class. Which of the following statements about Ridge regression is correct?
  1. Ridge regression is designed to handle class imbalance of the dataset.
  2. The regularization term in Ridge regression is added to the sum of absoluteresiduals.
  3. Increasing the value of the regularization parameter (alpha) in Ridgeregression makes the model less sensitive to high-magnitude coefficients.
  4. Ridge regression is equivalent to Lasso regression when the regularizationparameter (alpha) is set to zero.
Q6MCQ2 marks
Which of the following method is used to estimate the probabilities in SGD-Classifier with suitable loss?
  1. question figure
  2. question figure
  3. question figure
  4. question figure
Q7MCQ2 marks
question figure
  1. Faster to compute the list of neighbors on scaled data.
  2. k-nearest neighbors is based on computing some distances. Features need tobe normalized to contribute approximately equally to the distance computation.
  3. Scaling the data has a negligible effect on k-nearest neighbor’s performance,but it enhances the interpretability of the model.
  4. This is irrelevant. One could use k-nearest neighbors without normalizing thedataset and get a very similar cross-validation score.
Q8MCQ2 marks
When using CountVectorizer in scikit-learn, what does the max_features parameter control?
  1. The maximum number of documents considered during vectorization.
  2. The maximum number of features (words) to be extracted based on termfrequency.
  3. The maximum number of randomly selected features (words).
  4. The maximum number of characters allowed in each document.
Q9MCQ2 marks
Which of these may NOT help in handling overfitting in decision trees?
  1. Increasing the value of min_samples_split
  2. Increasing the value of the pruning parameter
  3. Increasing the value of min_samples_leaf
  4. Increasing the depth of the tree
Q10MCQ2 marks
Which of the following is/are Clustering Method.
  1. Connectivity-based Clustering
  2. Centroids-based Clustering
  3. Density-based Clustering
  4. All of them
Q11MCQ2 marks
You’re working with a large image and want to group similarly coloured segments in the image together. No other information is provided with the image. Which of the following techniques will you use to accomplish the task?
  1. Supervised learning
  2. Unsupervised learning
  3. Reinforcement learning
  4. None of these
Q12MCQ2 marks
question figure
  1. logistic
  2. relu
  3. identity
  4. tanh
Q13MCQ3 marks
question figure
  1. [5, 5, 3.75]
  2. [5, 5, 3]
  3. [4, 4, 3]
  4. [4, 4, 3.75]
Q14MCQ3 marks
question figure
  1. question figure
  2. question figure
  3. question figure
  4. question figure
Q15MCQ3 marks
Which of the following code snippets represent correct methods to obtain cross validated performance measure using LeaveOneOut?
  1. question figure
  2. question figure
  3. question figure
  4. question figure
  5. question figure
Q16MCQ3 marks
question figure
  1. (71)
  2. (71, 1)
  3. (10)
  4. (10, 2)
Q17MCQ3 marks
You’re building an ‘MLPClassifier‘ for a dataset with a large number of features. The goal is to predict whether a patient is going to have parkinson disease in next 12 months. You’re trying to decide the appropriate number of neurons in the hidden layers of the neural network. Which statement about adjusting the hidden_layer_sizes parameter is correct?
  1. Increasing the number of neurons in hidden layers will always lead to bettermodel performance.
  2. Decreasing the number of neurons in hidden layers reduces the model’scapacity to capture complex patterns.
  3. The number of neurons in hidden layers does not significantly affect themodel’s performance.
  4. Finding the optimal number of neurons is a trial-and-error process and mayrequire experimentation.
Q18MCQ3 marks
Which of the following code snippet can correctly plot the elbow graph for feature matrix X (k value is taken from 1 to 10)?
  1. question figure
  2. question figure
  3. question figure
  4. question figure
  5. question figure
Q19MCQ3 marks
question figure
  1. Increasing the model’s complexity to fit the training data more closely.
  2. Adding a stronger regularization term to the loss function, discouragingcomplex models.
  3. Making the model more capable to learn more complex behaviour.
  4. Adjusting the learning rate to control convergence speed.
Q20MCQ4 marks
question figure
  1. Output score is likely to increase.
  2. Output score is likely to decrease.
  3. Output score may increase or decrease.
  4. Output score will remain the same.
Q21MCQ4 marks
question figure
  1. 0
  2. 1
  3. 2
  4. 3
Q22MCQ4 marks
question figure
  1. Above code uses bootstrapping to generate samples for each base classifier.
  2. model will be tested on out of the bags samples.
  3. Due to weights=’distance’, each base KNN classifier will treat all neighborsequally in terms of voting power.
  4. The ensemble will consist of 3 base KNN classifiers.
  5. None of these
Q23MSQ2 marksselect all that apply
Consider a dataset representing various attributes of red wine, loaded into a Pandas DataFrame named data using the following code: question figure Consider a dataset representing various attributes of red wine, loaded into a Pandas DataFrame named data using the following code: Suppose we are interested in extracting the value of the chlorides attribute for the third sample in the dataset (2nd by index). Which of the following expressions correctly achieves this? chlorides is at the 4th index of columns.
  1. data.chlorides[2]
  2. data[’chlorides’][2]
  3. data[2][4]
  4. data.iloc[2, 4]
Q24MSQ2 marksselect all that apply
question figure
  1. It applies lasso penalty.
  2. The training may terminate after 499 iterations or lesser
  3. the classifier represents a perceptron model
  4. The classifier’s model parameters will initialized with parameters learnt fromprevious call to fit() function, if the same object is trained/fitted multiple times on new data.
Q25MSQ2 marksselect all that apply
Which of the following observations warrant use of SGD model?
  1. The data set size is 1000 GB.
  2. The model has to be trained in non-iterative manner.
  3. The model must be a decision tree.
  4. The model must be a logistic regressor.
  5. None of these
Q26MSQ2 marksselect all that apply
question figure
  1. question figure
  2. question figure
  3. question figure
  4. question figure
Q27MSQ2 marksselect all that apply
question figure
  1. ‘poly’,
  2. ‘lasso’
  3. ‘rbf’,
  4. ‘scale’
Q28MSQ3 marksselect all that apply
question figure
  1. malic_acid
  2. magnesium
  3. flavanoids
  4. proanthocyanins
  5. color_intensity
  6. proline
Q29MSQ3 marksselect all that apply
question figure
  1. question figure
  2. question figure
  3. question figure
  4. question figure
Q30MSQ3 marksselect all that apply
question figure
  1. [47, 31, 18, 95, 77]
  2. [47, 31, 18 ]
  3. [31, 41, 18, 95, 85, 77]
  4. [31, 41, 85, 31]
  5. [18, 95, 85, 77]
  6. [47, 31, 18, 85]
  7. None of these
Q31MSQ3 marksselect all that apply
When using a Support Vector Classifier (SVC) in scikit-learn with different values of the regularization parameter (C), how does the complexity of the decision boundary change? Select all correct statements:
  1. Smaller values of C result in a more complex decision boundary.
  2. Larger values of C result in a more complex decision boundary.
  3. The decision boundary becomes simpler with increasing values of C.
  4. Very large values of C may lead to overfitting.
Q32MSQ4 marksselect all that apply
question figure
  1. Number of samples at node N = 10. If it is split, it will result in 2 nodes in theleft child and 8 nodes in the right child.
  2. Number of samples at node N = 6. If it is split, it will result in 3 nodes in the leftchild and 3 nodes in the right child.
  3. Number of samples at node N = 12. If it is split, it will result in 5 nodes in theleft child and 7 nodes in the right child.
  4. Number of samples at node N = 4. If it is split, it will result in 3 nodes in the leftchild and 1 node in the right child.
Q33SA3 marks
question figure
Q34SA3 marks
question figure
Q35SA2 marks
question figure
Q36SA4 marks
question figure
Comprehension passage - the questions below it refer to this
Based on the above data, answer the given subquestions. question figure
Q37SA3 marks
How many Accidents per 1000 Driver happens for Age 25 and driving blue car ?
Q38MSQ2 marksselect all that apply
To improve the given model which of the following preprocessing step you suggest?
  1. StandardScaler()
  2. OrdinalEncoder()
  3. MinMaxScaler()
  4. LabelEncoder()

Answer key

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