ML Study Hub

Home / MLP / Week 9 / Real questions

MLP week 9 - real exam questions

53 questions pulled from past papers whose wording matches this week's topics, newest first, duplicates removed. Pick your answers, then press Check answers. Figures and answer keys are the originals.

Elapsed 00:00
MLP End Term · 13 Sep 2026 · open the full paper
Practice 1MCQ4 marks
Consider the following code: question figure After the model is fit raises an error. Why?
  1. VotingRegressor deletes the original estimator.
  2. VotingRegressor internally clones every estimator before fitting.
  3. LinearRegression does not store coefficients.
  4. VotingRegressor converts all models to RandomForest since it is the best model out of the 3 due to ensemble learning.
MLP End Term · 13 Sep 2026 · open the full paper
Practice 2MSQ3 marksselect all that apply
Which of the following parameters of a DecisionTreeClassifier in Sklearn can be adjusted if the model has a high varience?
  1. ccp_alpha
  2. random_state
  3. min_samples_split
  4. max_depth
MLP End Term · 13 Sep 2026 · open the full paper
Practice 3MCQ3 marks
Consider the following two ensemble regression architectures trained on the same dataset: question figure How do these two models differ in their output strategy to produce the final prediction for a given test instance, and how does adding more estimators affect them?
  1. ensemble1 computes a weighted sum of predictions where later trees have higher weights; ensemble2 takes a simple arithmetic mean of all trees.
  2. ensemble1 reduces variance by averaging independent predictions from 100 trees, meaning increasing n_estimators to 500 will ideally not cause overfitting.
  3. ensemble2 reduces bias sequentially, meaning increasing n_estimators to 500 carries no risk of overfitting.
  4. Both models output predictions by calculating the majority vote across the terminal leaf nodes of all individual base estimators.
MLP End Term · 10 May 2026 · open the full paper
Practice 4MSQ4 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.
MLP End Term · 21 Dec 2025 · open the full paper
Practice 5MSQ2 marksselect all that apply
Which of the following algorithms don't get impacted by feature scaling?
  1. LinearRegression
  2. KNN
  3. KMeans
  4. DecisionTree
MLP End Term · 21 Dec 2025 · open the full paper
Practice 6MSQ2 marksselect all that apply
For the RandomForestClassifier select the correct pair(s) of parameter(s) and their explanation(s).
  1. n_estimators – Number of trees in the RandomForestClassifier
  2. max_depth – Maximum depth allowed for each decision tree
  3. min_samples_leaf – Controls the maximum number of trees that will be created
  4. bootstrap – Sets the number of features used for splitting at each node
MLP End Term · 21 Dec 2025 · open the full paper
Practice 7MSQ2 marksselect all that apply
Which of the following is a hyper parameter?
  1. "intercept_" in LinearRegression
  2. "degree" in PolynomialFeatures
  3. "n_neighbors" in KNeighborsClassifier
  4. "max_depth" in DecisionTreeClassifier
MLP End Term · 21 Dec 2025 · open the full paper
Practice 8MSQ2 marksselect all that apply
Consider the following code snippet that trains a Decision Tree classifier using scikit-learn: question figure A node in the trained decision tree is split only if both of the following conditions are satisfied: • The node contains at least min_samples_split samples. • Each child node created after the split contains at least min_samples_leaf samples. Assume node (N) is a non-leaf node being considered for splitting. In which of the following cases will the split at node (N) be allowed?
  1. Node (N) contains 15 samples. After splitting, the left child has 9 samples and the right child has 6 samples.
  2. Node (N) contains 6 samples. After splitting, the left child has 4 samples and the right child has 2 samples.
  3. Node (N) contains 12 samples. After splitting, the left child has 3 samples and the right child has 9 samples.
  4. Node (N) contains 8 samples. After splitting, the left child has 4 samples and the right child has 4 samples.
MLP End Term · 21 Dec 2025 · open the full paper
Practice 9MCQ2 marks
Consider the following ensemble model built using VotingClassifier with voting='soft': question figure How is the final prediction for a test sample obtained?
  1. By selecting the most common predicted class.
  2. By averaging predicted class probabilities.
  3. By summing the predicted class labels.
  4. By choosing the most accurate classifier.
MLP End Term · 21 Dec 2025 · open the full paper
Practice 10MSQ1 markselect all that apply
We use classification report to evaluate our classification model: question figure Which of the following metrics are included in the classification report?
  1. Accuracy
  2. Mean Squared Error
  3. F1 Score
  4. Cross Entropy Loss
  5. Recall
MLP End Term · 21 Dec 2025 · open the full paper
Practice 11MCQ2 marks
You are training a RandomForestRegressor on a dataset with 20 features and 10,000 samples. Consider the following code: question figure Which of the following statements is TRUE about how this Random Forest model will behave?
  1. With bootstrap=True, every tree sees the entire dataset, but the samples are shuffled randomly for each tree.
  2. The forest will use all 20 features for each split, but only 5 trees out of the 200 will be trained on bootstrap samples.
  3. Setting max_features=5 means only 5 trees out of 200 will use feature subsets, while the rest use all features.
  4. Each tree will consider only 5 randomly chosen features when looking for the best split at every node.
MLP End Term · 21 Dec 2025 · open the full paper
Practice 12MSQ2 marksselect all that apply
Select the correctly matched pairs of sklearn functions with the use of fit, fit_transform and transform.
  1. Learning the weights of logistic regression model on training data - fit_transform
  2. Creating a decision tree on the training data - fit
  3. fitting MinMaxScaler on test data - fit_transform
  4. fitting MinMaxScaler on train data - fit_transform
MLP End Term · 21 Dec 2025 · open the full paper
Practice 13MCQ2 marks
Given the following code using BaggingClassifier with KNeighborsClassifier as the base estimator: question figure Which of the following statements is correct?
  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 neighbors equally in terms of voting power.
  4. The ensemble will consist of 3 base KNN classifiers.
  5. None of these
MLP End Term · 21 Dec 2025 · open the full paper
Practice 14MSQ2 marksselect all that apply
Which of the following algorithms may get impacted by feature scaling?
  1. LinearRegression
  2. DecisionTree
  3. SVM
  4. NaiveBayes
MLP End Term · 13 Apr 2025 · open the full paper
Practice 15MCQ2 marks
question figure
  1. It can only be used with classifiers that output probabilities.
  2. When voting=‘hard’, it chooses the class with the highest sum of predictedprobabilities.
  3. When voting=‘soft’, it averages the predicted probabilities and picks the classwith the highest probability.
  4. It cannot be used with Pipeline objects.
MLP End Term · 22 Dec 2024 · open the full paper
Practice 16MCQ2 marks
Which of the following is NOT a hyperparameter in machine learning?
  1. Learning rate in gradient descent
  2. Bias in a linear regression model
  3. Number of clusters in k-means
  4. Minimum leaf size in decision trees
MLP End Term · 22 Dec 2024 · open the full paper
Practice 17MSQ3 marksselect all that apply
question figure
  1. GaussianNB
  2. LogisticRegression
  3. SGDClassifier
  4. RandomForestClassifier
MLP End Term · 22 Dec 2024 · open the full paper
Practice 18MCQ2 marks
question figure
  1. It determines the number of features to select for each base model.
  2. It controls the number of base learners (models) to train in the ensemble.
  3. It decides the maximum number of samples to use in each base model.
  4. It ensures randomness in the sample selection for each base model.
MLP End Term · 01 Sep 2024 · open the full paper
Practice 19SA2 marks
Consider following parameter grid for regression with RandomForest: question figure Consider following parameter grid for regression with RandomForest: How many unique combinations of hyperparameters are there in the above parameter grid?
MLP End Term · 01 Sep 2024 · open the full paper
Practice 20MCQ3 marks
question figure
  1. It determines the function to measure the quality of a split.
  2. It specifies the number of features to consider when looking for the best split.
  3. It sets the strategy used to choose the split at each node.
  4. It controls whether to use the Gini impurity or entropy.
MLP End Term · 01 Sep 2024 · open the full paper
Practice 21MCQ3 marks
Consider below statements and choose the correct option: Statement1:The bagging technique combines multiple models trained on different subsets of data Statement2:The Boosting technique trains the model Parallelly, focusing on the error made by the other model.
  1. Statement1 is True, Statement2 is True
  2. Statement1 is True, Statement2 is False
  3. Statement1 is False, Statement2 is True
  4. Statement1 is False, Statement2 is False
MLP End Term · 01 Sep 2024 · open the full paper
Practice 22MCQ2 marks
Decision Trees are prone to:
  1. Low bias, low variance
  2. High bias, low variance
  3. Low bias, high variance
  4. High bias, high variance
MLP End Term · 01 Sep 2024 · open the full paper
Practice 23MSQ2 marksselect all that apply
Which of the following models are inherently multiclass models?
  1. Perceptron
  2. DecisionTreeClassifier
  3. KNeighborClassifier
  4. LogisticRegression
MLP Quiz 2 · 04 Aug 2024 · open the full paper
Practice 24MCQ2 marks
question figure
  1. [0, 1, 2]
  2. [0, 1]
  3. ['setosa', 'versicolor', 'virginica']
  4. ['setosa', 'versicolor’']
  5. None of these
MLP End Term · 28 Apr 2024 · open the full paper
Practice 25MCQ3 marks
You’re working on a dataset containing customer purchase data, and you want to segment the customers into distinct groups based on their purchasing behavior. Each data point represents a customer and includes features like “Total Amount Spent” and “Number of Items Purchased.” Which algorithm is suitable for this scenario?
  1. Linear Regression
  2. Decision Tree
  3. K-means Clustering
  4. Support Vector Machine
  5. None of these
MLP End Term · 28 Apr 2024 · open the full paper
Practice 26MSQ3 marksselect all that apply
Which of the following techniques are used in decision trees to make decisions or to measure the quality of a split while training the model?
  1. Entropy
  2. RoC Curve
  3. Cross Entropy
  4. Gini Impurity
MLP End Term · 24 Dec 2023 · open the full paper
Practice 27MCQ2 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
MLP End Term · 24 Dec 2023 · open the full paper
Practice 28MCQ4 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
MLP End Term · 24 Dec 2023 · open the full paper
Practice 29MSQ2 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
MLP End Term · 24 Dec 2023 · open the full paper
Practice 30MCQ2 marks
Comprehension passage for this question
Based on the above data, answer the given subquestions. question figure
To improve the given Linear Regression model which of the following preprocessing step you suggest?
  1. OrdinalEncoder()
  2. DecisionTree()
  3. LabelEncoder()
  4. StandardScaler()
MLP Quiz 2 · 03 Dec 2023 · open the full paper
Practice 31MCQ4 marks
According to DecisionTreeClassifier parameters which of the following option will have least fitting(underfit) for the same data.
  1. question figure
  2. question figure
  3. question figure
  4. question figure
MLP Quiz 2 · 03 Dec 2023 · open the full paper
Practice 32MSQ2 marksselect all that apply
Which of the following are advantages of using ensemble methods in machine learning?
  1. Improved model performance
  2. Reduced overfitting
  3. Faster model training
  4. Simplicity of model interpretation
MLP Quiz 2 · 03 Dec 2023 · open the full paper
Practice 33MSQ3 marksselect all that apply
Suppose In a classification problem you want to use BaggingClassifier, which of the following estimator(s) could be used as base estimator in that?
  1. question figure
  2. question figure
  3. question figure
  4. question figure
  5. question figure
MLP Quiz 1 · 29 Oct 2023 · open the full paper
Practice 34MCQ2 marks
question figure
  1. Optimize the model’s complexity by automatically determining the best αthrough cross-validation.
  2. Reduce overfitting by incorporating 10-fold cross-validation during modelselection.
  3. Make predictions using an ensemble of 10 different Lasso models trained ondifferent subsets of the data.
  4. Maximize the number of features retained in the model, ensuring a complexmodel representation.
MLP End Term · 03 Sep 2023 · open the full paper
Practice 35MSQ3 marksselect all that apply
question figure
  1. MultinomialNB
  2. RandomForestRegressor
  3. LogisticRegressor
  4. SGDRegressor
MLP End Term · 30 Apr 2023 · open the full paper
Practice 36MCQ2 marks
question figure
  1. DecisionTreeClassifier
  2. RandomForestRegressor
  3. LogisticRegressor
  4. SGDRegressor
MLP End Term · 30 Apr 2023 · open the full paper
Practice 37MCQ3 marks
Consider the following statements about SGDClassifier: 1. It can be used to train a model on large dataset that doesn’t fit in main memory 2. It can emulate a KNN model 3. It can emulate a decision tree model 4. It can emulate a perceptron Choose the correction option(s)
  1. 1 and 4
  2. 1 and 2
  3. 2 and 3
  4. 3 and 4
MLP End Term · 30 Apr 2023 · open the full paper
Practice 38MCQ3 marks
Following is the code to tune the n_estimators parameter of a Bagging Classifier model. question figure Following is the code to tune the n_estimators parameter of a Bagging Classifier model.
  1. question figure
  2. question figure
  3. question figure
  4. question figure
  5. question figure
MLP End Term · 30 Apr 2023 · open the full paper
Practice 39MCQ4 marks
Consider the following code. How many DecisionTreeClassifier models will be trained internally? question figure Consider the following code. How many DecisionTreeClassifier models will be trained internally?
  1. 20
  2. 200
  3. 8
  4. 150
  5. 15
  6. 80
MLP End Term · 11 Dec 2022 · open the full paper
Practice 40MCQ2 marks
When a node is split further in a decision tree:
  1. It creates only two new children nodes always.
  2. It can create two or more new children nodes always.
  3. It depends on the cardinality of the categorical feature.
  4. It depends on the scale of the numerical feature.
MLP End Term · 11 Dec 2022 · open the full paper
Practice 41MSQ2 marksselect all that apply
Which of the following are hyper parameters in a decision tree?
  1. Number of features
  2. Number of minimum samples to split
  3. Height of the tree
  4. Diameter of the tree
MLP End Term · 11 Dec 2022 · open the full paper
Practice 42MCQ3 marks
Consider following statements regarding a decision tree model? 1. It is a parametric model. 2. It has a tendency to overfit if allowed to grow unconditionally. 3. It can be used for regression, classification and clustering problems. 4. It is one of the easiest machine learning models to interpret. 5. For classification problems, decision tree’s loss function is same as evaluation metric. Choose the option with all the correct statements:
  1. 2, 3
  2. 1, 3, 5
  3. 3, 5
  4. 2, 4
  5. 1, 3, 4
  6. 1, 2, 4
MLP End Term · 11 Dec 2022 · open the full paper
Practice 43MCQ3 marks
Lata wants to train a bagging regressor with following specifications: 1. Base estimator as linear regressor with default parameter values. 2. 80% of the data is used to create a bag of samples. 3. Create subsets of training set without replacement. 4. Take half the features when creating subsets of data. 5. Train the model on training set. 6. Print score on test set. Which of the following code blocks will correctly execute Lata’s task? [Note: Assume necessary imports and variables for training and test sets.]
  1. question figure
  2. question figure
  3. question figure
  4. question figure
  5. question figure
MLP End Term · 11 Dec 2022 · open the full paper
Practice 44MCQ3 marks
You have a binary classification problem to solve with following information: 1. All features are numircal. 2. The dataset has size of 80 GB. 3. The data has to be preprocessed. 4. After data preprocessing, train the model with gradient descent or its variations. Which of the following will perform the above task?
  1. Perform one hot encoding followed by training with LogisticRegression model(sklearn.linear_model).
  2. Perform standard scaling followed by asklearn.neighbors.KNeighborsClassifier model.
  3. Perform min-max scaling followed by a sklearn.tree.DecisionTreeClassifiermodel.
  4. Perform max-absolute scaling followed by asklearn.linear_model.SGDClassifier model.
MLP End Term · 11 Dec 2022 · open the full paper
Practice 45MCQ4 marks
Brajesh wants to tune hyper parameters of an AdaBoost model for a classification problem with following specifications: 1. Base estimator as Decision trees classifier with max_depth=1. 2. Number of estimators range from 30 to 40 (both inclusive) at the interval of 1. 3. Cross validation = 5. 4. Learning rate must vary between 0.2 to 2.0 (both inclusive) at the intervals of 0.2. 5. Train the best model on the entire training set. 6. Print score on test set. Which of the following code blocks will correctly execute Brajesh’s task? [Note: Assume necessary imports and variables for training and test sets.]
  1. question figure
  2. question figure
  3. question figure
  4. question figure
  5. question figure
MLP End Term · 11 Dec 2022 · open the full paper
Practice 46MCQ2 marks
Consider following statements regarding a decision tree model: 1. It is a non-parametric model. 2. It has a tendency to underfit if allowed to grow unconditionally. 3. It can be used for regression and classification problems only, but not for clustering. 4. It is one of the most difficult machine learning models to interpret. 5. For regression problems, decision tree’s loss function and evaluation metric can be same. Choose the option with all the correct statements:
  1. 1, 3, 5
  2. 1, 3
  3. 3, 5
  4. 2, 4
  5. 1, 3, 4
  6. 1, 2, 4
MLP End Term · 11 Dec 2022 · open the full paper
Practice 47MCQ2 marks
When a node is split in a decision tree (in sklearn):
  1. It creates only two new children nodes always.
  2. It can create two or more new children nodes always.
  3. It depends on the cardinality of the categorical feature.
  4. It depends on the scale of the numerical feature.
MLP End Term · 11 Dec 2022 · open the full paper
Practice 48MSQ2 marksselect all that apply
Which of the following are hyper parameters in a decision tree in sklearn?
  1. Number of features
  2. Number of minimum samples to split
  3. Height of the tree
  4. Diameter of the tree
MLP End Term · 11 Dec 2022 · open the full paper
Practice 49MCQ3 marks
You have a regression problem to solve with following information: 1. All features are numerical. 2. The dataset has size of 40 GB. 3. The data has to be preprocessed. 4. After data preprocessing, train the model with gradient descent or its variations. Which of the following will perform the above task?
  1. Perform one hot encoding followed by training with LinearRegression model(from sklearn.linear_model).
  2. Perform standard scaling followed by training with KNeighborsRegressormodel (from sklearn.neighbors).
  3. Perform min-max scaling followed by training with DecisionTreeRegressormodel (from sklearn.tree).
  4. Perform min-max scaling followed by training with SGDRegressor model (fromsklearn.linear_model).
MLP End Term · 11 Dec 2022 · open the full paper
Practice 50MCQ4 marks
Rajesh wants to tune hyper parameters of an AdaBoost model for a classification problem with following specifications: 1. Base estimator as Decision trees classifier with max_depth=1. 2. Number of estimators range from 10 to 20 (both inclusive) at the interval of 1. 3. Cross validation =4. 4. Learning rate must vary between 0.1 to 1.0 (both inclusive) at the intervals of 0.1. 5. Train the best model on the entire training set. 6. Print score on test set. Which of the following code blocks will correctly execute Rajesh’s task? [Note: Assume necessary imports and variables for training and test sets.]
  1. question figure
  2. question figure
  3. question figure
  4. question figure
  5. question figure
MLP End Term · 11 Dec 2022 · open the full paper
Practice 51MCQ4 marks
Asha wants to train a bagging classifier with following specifications: 1. Base estimator as k nearest neighbour classifier with default parameter values. 2. 70% of the data is used to create a bag of samples. 3. Create subsets of training set with replacement. 4. Take all features when bootstrapping. 5. Train the model on training set. 6. Print score on test set. Which of the following code blocks will correctly execute Asha’s task? [Note: Assume necessary imports and variables for training and test sets.]
  1. question figure
  2. question figure
  3. question figure
  4. question figure
  5. question figure
MLP End Term · 07 Aug 2022 · open the full paper
Practice 52MSQ2 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
MLP End Term · 07 Aug 2022 · open the full paper
Practice 53MCQ3 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.