ML Study Hub

Home / MLP / Week 2 / Real questions

MLP week 2 - real exam questions

40 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
Determine the output of the following text preprocessing pipeline: question figure
  1. ['red','blue','green','yellow']
  2. ['blue' 'red','yellow']
  3. ['blue' 'red']
  4. ['red','blue','green']
MLP End Term · 13 Sep 2026 · open the full paper
Practice 2SA3 marks
What is the output of the following preprocessing pipeline code? (Round off to 2 decimal places if applicable) question figure
MLP End Term · 13 Sep 2026 · open the full paper
Practice 3SA3 marks
The pipeline first imputes the missing value with the (mean) strategy and then standardizes the column. What is the value of (the transformed value of the first sample, whose original value is 2)? (Enter up to 2 decimals) question figure
MLP End Term · 13 Sep 2026 · open the full paper
Practice 4MSQ2 marksselect all that apply
Select the false statements:
  1. StandardScaler ensures the features correspond to a uniform distribution after scaling.
  2. MinMaxScaler ensures that feature values follow a Gaussian Distribution
  3. OridnalEncoder is best for data which contains values corresponding to a Normal Distribution.
  4. Pipeline helps us apply separate transformations to numerical and categorical columns directly.
MLP End Term · 13 Sep 2026 · open the full paper
Practice 5MSQ3 marksselect all that apply
Regarding building pipelines with and , select all statements that are correct.
  1. Every intermediate step of a must be a transformer, i.e. it must implement both and .
  2. The final estimator of a only needs to implement .
  3. requires the user to supply an explicit name for each step, just like .
  4. A object exposes the interface (e.g. ) of its last step.
MLP End Term · 13 Sep 2026 · open the full paper
Practice 6MCQ3 marks
Consider the following code snippet: question figure Which of the following holds true?
  1. The model performs no regularization.
  2. The model performs regularization and the regularization can also perfrom some feature selection.
  3. The model performs regularization and the regularization cant perfrom some feature selection.
  4. The model is very likely to be prone to overfitting
MLP End Term · 10 May 2026 · open the full paper
Practice 7MSQ5 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.
MLP End Term · 10 May 2026 · open the full paper
Practice 8MCQ3 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
MLP End Term · 10 May 2026 · open the full paper
Practice 9MCQ5 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.
MLP End Term · 21 Dec 2025 · open the full paper
Practice 10SA2 marks
You are performing hyperparameter tuning using GridSearchCV for a machine learning model. The following parameter grid is provided: question figure How many unique hyperparameter combinations will GridSearchCV evaluate in total?
MLP End Term · 21 Dec 2025 · open the full paper
Practice 11MSQ2 marksselect all that apply
Select the correct statements from the following regarding GridSearchCV:
  1. best_score parameter of grid search returns the mean cross validated score of all the cross validation folds.
  2. best_score parameter of grid search returns the max cross validated score of all the cross validation folds.
  3. If there are 2 parameter sets A and B with A having 3 values and B having 4 values the total parameter combinations grid search will try is 7.
  4. If there are 2 parameter sets A and B with A having 3 values and B having 4 values the total parameter combinations grid search will try is 12.
  5. No other scoring metric other than R2 score and mean_squared_error can be used as the scoring metric for GridSearchCV in case of regression problems.
MLP End Term · 31 Aug 2025 · open the full paper
Practice 12MSQ2 marksselect all that apply
question figure
  1. Saves computation time by reusing results of expensive transformations wheninputs and parameters have not changed.
  2. Helps speed up repeated runs of cross-validation involving the sametransformation steps.
  3. Reduces CPU usage by running transformations in parallel threadsautomatically.
  4. Improves efficiency in hyperparameter search by avoiding redundantcomputations in pipeline steps.
  5. Guarantees better generalization performance on the test set.
MLP End Term · 13 Apr 2025 · open the full paper
Practice 13MCQ2 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 · 13 Apr 2025 · open the full paper
Practice 14MSQ2 marksselect all that apply
Which of the following techniques can be used for hyperparameter tuning in Ridge Regression? Select all correct options.
  1. GridSearchCV
  2. ElasticNetCV
  3. RandomizedSearchCV
  4. Mini batch gradient descent
MLP End Term · 13 Apr 2025 · open the full paper
Practice 15MCQ2 marks
Which of the following techniques can be used for hyperparameter tuning in SGD Regression?
  1. GridSearchCV
  2. ElasticNetCV
  3. SelectKBest
  4. Feature Scaling with StandardScaler
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
Consider the following options for evaluating the optimal number of clusters in k-means. Which approaches are valid?
  1. Using an Elbow Curve.
  2. Computing Silhouette Scores.
  3. Cross-validation with multiple folds.
  4. All of these
MLP Quiz 1 · 27 Oct 2024 · open the full paper
Practice 18MSQ2 marksselect all that apply
Which of the following is correct about cross-validation in machine learning?
  1. Cross-validation helps prevent overfitting.
  2. It is a technique to improve the model’s accuracy.
  3. K-Fold cross-validation is one of the most popular types of cross-validation.
  4. Cross-validation is not suitable for small datasets.
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 20MCQ4 marks
question figure
  1. The mean accuracy across all cross-validation folds.
  2. The mean precision across all cross-validation folds.
  3. The mean recall across all cross-validation folds.
  4. The mean F1 score across all cross-validation folds.
MLP End Term · 01 Sep 2024 · open the full paper
Practice 21MSQ3 marksselect all that apply
Which of the following is true about Naive Bayes algorithm ?
  1. It is primarily used for regression problems
  2. It is primarily used for classification problems
  3. Hyperparameter tuning is required
  4. Hyperparameter tuning is not required
MLP Quiz 2 · 04 Aug 2024 · open the full paper
Practice 22MCQ2 marks
question figure
  1. The importance of each feature in predicting the target.
  2. The residuals of the model.
  3. The intercept of the regression line.
  4. It represents the values of hyperparameters of the model.
MLP Quiz 2 · 04 Aug 2024 · open the full paper
Practice 23MCQ2 marks
question figure
  1. The training data is split into 5 different datasets, each used to train a separatemodel.
  2. The model is trained and evaluated using 5-fold cross-validation forhyperparameter tuning
  3. Five different models are trained on 5 resampled datasets of training data.
  4. The dataset is divided into 5 parts and trained in a single pass without cross-validation.
MLP Quiz 2 · 04 Aug 2024 · open the full paper
Practice 24MCQ2 marks
What is the main advantage of using RandomizedSearchCV over GridSearchCV ?
  1. RandomizedSearchCV is always faster.
  2. RandomizedSearchCV evaluates all possible combinations ofhyperparameters.
  3. RandomizedSearchCV can sample a larger hyperparameter space with feweriterations.
  4. RandomizedSearchCV always finds the best model.
MLP End Term · 28 Apr 2024 · open the full paper
Practice 25MCQ2 marks
What is the purpose of k-fold cross-validation ?
  1. To split data into training and testing sets.
  2. To tune hyperparameters.
  3. To evaluate model performance on multiple subsets.
  4. To preprocess data.
MLP End Term · 28 Apr 2024 · open the full paper
Practice 26MSQ3 marksselect all that apply
Which of the following approaches is(are) helpful to find a good value for k in k−means clustering algorithm?
  1. Plotting an Elbow curve.
  2. Using classifiers before making clusters.
  3. Plotting Silhouette coefficient for various values of k.
  4. Using k-fold cross validation
MLP Quiz 2 · 24 Mar 2024 · open the full paper
Practice 27MCQ2 marks
You’re building a machine learning pipeline to preprocess data and train a model on a classification task. You decide to use a pipeline that includes data preprocessing and a support vector machine (SVM) classifier. The following code snippet demonstrates the pipeline creation and usage: question figure You’re building a machine learning pipeline to preprocess data and train a model on a classification task. You decide to use a pipeline that includes data preprocessing and a support vector machine (SVM) classifier. The following code snippet demonstrates the pipeline creation and usage: What is the purpose of using the pipeline in this code snippet?
  1. The pipeline combines multiple models for better model performance.
  2. The pipeline allows for simultaneous training of the scaler and classifier.
  3. The pipeline simplifies the code by encapsulating preprocessing and modelingsteps.
  4. The pipeline ensures that only linear SVM can be used for this classificationtask.
MLP End Term · 24 Dec 2023 · open the full paper
Practice 28MCQ2 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.
MLP End Term · 24 Dec 2023 · open the full paper
Practice 29MCQ3 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
MLP Quiz 1 · 29 Oct 2023 · open the full paper
Practice 30MCQ2 marks
Choose the options with respect to the given statements: Statement1 : To apply various sklearn methods from in series on a column we should use Pipeline. Statement2 : To apply various sklearn methods on various columns in parallel we should use ColumnTransformer.
  1. Statement 1 False, Statement 2 False
  2. Statement 1 True, Statement 2 False
  3. Statement 1 False, Statement 2 True
  4. Both statements are True
MLP Quiz 1 · 29 Oct 2023 · open the full paper
Practice 31MCQ2 marks
question figure
  1. The pipeline will generate polynomial features (including squared terms) andthen scale these features to a range between 0 and 1.
  2. The transformed data will consist of the original features, their squares, andinteraction terms, all scaled between 0 and 1.
  3. The pipeline scales the original features between 0 and 1, then subsequentlygenerates polynomial combinations including both square terms and interaction terms.
  4. Only interaction terms between features are generated by the pipeline, whichare then scaled between 0 and 1, without including the squared terms of individual features.
MLP Quiz 1 · 29 Oct 2023 · open the full paper
Practice 32MCQ2 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 33MCQ3 marks
You’re working on a binary classification problem where the dataset is relatively small, and you suspect that a linear decision boundary will work well due to distinct class separation. Additionally, you want to perform logistic regression with L1 regularization for improved feature selection. Which solver is most appropriate for this scenario?
  1. Newton-CG
  2. SGD
  3. LBFGS
  4. Liblinear
MLP End Term · 30 Apr 2023 · open the full paper
Practice 34MCQ2 marks
Which of the following is a hyperparameter?
  1. L1-ratio in elasticnet
  2. Pruning parameter in a decision tree
  3. Learning rate in SGDRegressor
  4. All of these
MLP End Term · 30 Apr 2023 · open the full paper
Practice 35MCQ3 marks
Which of the following APIs only supports conjoining transformers and estimators in series (i.e. one after another)?
  1. Pipeline
  2. ColumnTransformer
  3. FeatureUnion
  4. All of these
MLP End Term · 30 Apr 2023 · open the full paper
Practice 36MSQ3 marksselect all that apply
Which of the following ways can help in feature selection?
  1. Drop a Feature with many missing values
  2. Drop a feature containing data with high standard deviation
  3. Use SelectKBest or SelectKPercentile methods
  4. Drop a feature which has high correlation with target variable
MLP End Term · 11 Dec 2022 · open the full paper
Practice 37MCQ4 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 38MCQ4 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 · 07 Aug 2022 · open the full paper
Practice 39MSQ2 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
MLP End Term · 07 Aug 2022 · open the full paper
Practice 40MSQ2 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.