ML Study Hub

Home / Past papers / MLP End Term / this paper

IIT M FOUNDATION ET1 EXAM QPF1 S1 03 Sep - 03 Sep 2023

MLP End Term34 questions100 marks23 MCQ · 6 SA · 5 MSQFoundation / QPF1
Elapsed 00:00
Q1SA2 marks
What will be the output of the following code: question figure What will be the output of the following code:
Q2SA2 marks
What will be the numerical value in the output array of the following code: question figure What will be the numerical value in the output array of the following code:
Q3MCQ2 marks
question figure
  1. question figure
  2. question figure
  3. question figure
  4. question figure
Q4MCQ2 marks
question figure
  1. The predicted classes for the new data points.
  2. The decision boundary values for the classes.
  3. The posterior probabilities of the classes for the new data points.
  4. The likelihood estimates for the new data points.
Q5MCQ2 marks
question figure
  1. (15,2)
  2. (2,3)
  3. (2,15)
  4. (15,3)
Q6MCQ2 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
Q7MCQ2 marks
You’re working with a dataset of geographical locations and want to group similar locations together based on their distances. The dataset includes latitude and longitude coordinates for each location. Which linkage method would be most appropriate for this scenario?
  1. Complete Linkage
  2. Ward’s Linkage
  3. Single Linkage
  4. Average Linkage
Q8MCQ2 marks
You’re analyzing a dataset of customer transaction histories. Each transaction includes the purchase amount and timestamp. You want to identify groups of customers based on their spending behavior. Which clustering approach would be most appropriate for this scenario?
  1. Distribution-based Clustering
  2. Density-based Clustering
Q9MSQ3 marksselect all that apply
question figure
  1. question figure
  2. question figure
  3. question figure
  4. question figure
Q10MSQ3 marksselect all that apply
question figure
  1. MultinomialNB
  2. RandomForestRegressor
  3. LogisticRegressor
  4. SGDRegressor
Q11MSQ3 marksselect all that apply
Which of the following option(s) are correct regarding regularization?
  1. It is a technique used to minimize the adjusted loss function and avoidunderfitting.
  2. It helps in increasing the bias of the training model.
  3. It determines the rows to be selected as a training dataset.
  4. Elastic net regularization is a combination of L1 and L2 regularization both.
Q12MCQ3 marks
Given the following code snippet that preprocesses a dataset with both continuous and categorical features using sklearn.preprocessing tools, what will be the first row of the X transformed array after preprocessing? question figure Given the following code snippet that preprocesses a dataset with both continuous and categorical features using sklearn.preprocessing tools, what will be the first row of the X transformed array after preprocessing?
  1. question figure
  2. question figure
  3. question figure
  4. question figure
Q13MCQ3 marks
question figure
  1. (20640, 8)
  2. (20640, 5)
  3. (20640, 44)
  4. (20640, 49)
Q14MCQ3 marks
What is the main principle behind a dummy regressor’s prediction strategy?
  1. Predict the mean or median of the target variable for all instances.
  2. Fit a complex mathematical function to the data.
  3. Randomly shuffle the target variable values to make predictions.
  4. Predict the sum of the input features for each instance.
Q15MCQ3 marks
question figure
  1. It converts the numerical values in the data array to categorical labels.
  2. It standardizes the features in the data array to have zero mean and unitvariance.
  3. It applies a logarithmic transformation to the values in the data array.
  4. It removes the mean and scales the features in the data array to a specificrange.
Q16MCQ3 marks
question figure
  1. question figure
  2. question figure
  3. question figure
  4. question figure
Q17MCQ3 marks
question figure
  1. question figure
  2. question figure
  3. question figure
  4. question figure
Q18MCQ3 marks
question figure
  1. question figure
  2. question figure
  3. question figure
  4. question figure
Q19MCQ3 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
Q20MCQ3 marks
question figure
  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.
Q21MCQ3 marks
You’re designing an ‘MLPClassifier’ for an image recognition task. The dataset consists of grayscale images of animals. You want to introduce non-linearity to the neural network’s architecture. Which element of the neural network architecture would you adjust to incorporate non-linearity in the model?
  1. Number of hidden layers
  2. Number of neurons in input layer
  3. Learning rate
  4. Activation function
Q22MCQ3 marks
You’re working on a binary classification task using the ‘MLPClassifier’ to predict whether a customer will make a purchase based on their browsing behavior.You’re concerned about overfitting due to the complexity of the model. You decide to increase the ‘alpha’ parameter to control overfitting. The following code snippet shows the application of ‘MLPClassifier’: question figure You’re working on a binary classification task using the ‘MLPClassifier’ to predict whether a customer will make a purchase based on their browsing behavior.You’re concerned about overfitting due to the complexity of the model. You decide to increase the ‘alpha’ parameter to control overfitting. The following code snippet shows the application of ‘MLPClassifier’:
  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 sensitive to outliers and noise in the data.
  4. Adjusting the learning rate to control convergence speed.
Q23SA3 marks
question figure
Q24SA3 marks
Using the confusion matrix given below. What is the precision score for the label (class) 1 ? question figure Using the confusion matrix given below. What is the precision score for the label (class) 1 ?
Q25SA3 marks
question figure
Q26SA3 marks
question figure
Q27MSQ4 marksselect all that apply
Which of the following statements are true?
  1. KNeighborsClassifier with low values of n_neighbors produces complexdecision boundaries.
  2. KNeighborsClassifier with low values of n_neighbors produces smoothdecision boundaries.
  3. In KNeighborsClassifier the scale of the features(columns) can impact thedecision boundaries.
  4. None of these
Q28MSQ2 marksselect all that apply
Fill in the missing parameter value in the following estimator that can be used to classify the data question figure Fill in the missing parameter value in the following estimator that can be used to classify the data
  1. ‘lasso’
  2. ‘linear’,
  3. ‘rbf’,
  4. ‘scale’
Q29MCQ4 marks
question figure
  1. question figure
  2. question figure
Q30MCQ4 marks
question figure
  1. question figure
  2. question figure
  3. question figure
  4. question figure
Q31MCQ4 marks
question figure
  1. question figure
  2. question figure
  3. question figure
  4. question figure
Q32MCQ4 marks
question figure
  1. question figure
  2. question figure
  3. question figure
  4. question figure
Q33MCQ4 marks
question figure
  1. question figure
  2. question figure
  3. question figure
  4. question figure
Q34MCQ4 marks
You’re working with a dataset of customer purchase behavior, including attributes “Total Amount Spent” and “Number of Items Purchased.” You decide to use K-means clustering to segment customers into groups based on these features. The following code snippet demonstrates the K-means clustering process: question figure You’re working with a dataset of customer purchase behavior, including attributes “Total Amount Spent” and “Number of Items Purchased.” You decide to use K-means clustering to segment customers into groups based on these features. The following code snippet demonstrates the K-means clustering process:
  1. The total amount spent by each customer.
  2. The cluster assignments indicating which group each customer belongs to.
  3. The number of items purchased by each customer.
  4. The centroid coordinates of the clusters formed.

Answer key

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

Concepts this paper tests

Auto-generated summary from the source site. Handy as a checklist; the lessons above explain each idea from scratch.

Here’s a structured summary of the core topics, concepts, principles, and equations essential for the Diploma Level: Machine Learning Practice (Computer-Based Exam). The summary is organized by topic domains and includes key equations where applicable.


1. Data Preprocessing

Key Concepts

z=x−μσz = \frac{x - \mu}{\sigma}

where μ\mu = mean, σ\sigma = standard deviation.

xscaled=x∣Xmax∣x_{\text{scaled}} = \frac{x}{|X_{\text{max}}|}
xscaled=x−XminXmax−Xminx_{\text{scaled}} = \frac{x - X_{\text{min}}}{X_{\text{max}} - X_{\text{min}}}

2. Dimensionality Reduction

Key Concepts


3. Supervised Learning

Key Algorithms & Concepts

A. Linear Models

  1. Linear Regression:

    • Equation:
y=w0+w1x1+w2x2+⋯+wnxn+ϵy = w_0 + w_1x_1 + w_2x_2 + \dots + w_nx_n + \epsilon
Loss=MSE+α∑i=1nwi2\text{Loss} = \text{MSE} + \alpha \sum_{i=1}^n w_i^2
Loss=MSE+α∑i=1n∣wi∣\text{Loss} = \text{MSE} + \alpha \sum_{i=1}^n |w_i|
Loss=MSE+α(ρ∑∣wi∣+1−ρ2∑wi2)\text{Loss} = \text{MSE} + \alpha (\rho \sum |w_i| + \frac{1-\rho}{2} \sum w_i^2)
  1. Logistic Regression:

    • Sigmoid function:
σ(z)=11+e−z\sigma(z) = \frac{1}{1 + e^{-z}}

B. Naive Bayes

P(y∣X)=P(X∣y)P(y)P(X)P(y|X) = \frac{P(X|y)P(y)}{P(X)}

C. Support Vector Machines (SVM)

D. Decision Trees & Ensembles

  1. DecisionTreeClassifier:

    • Splitting Criteria:

      • Gini Impurity:
G=1−∑i=1cpi2G = 1 - \sum_{i=1}^c p_i^2
H=−∑i=1cpilog⁡2piH = -\sum_{i=1}^c p_i \log_2 p_i
  1. Random Forest:

    • Bagging (Bootstrap Aggregating): Trains multiple trees on random subsets of data/features.
    • Hyperparameters:

      • n_estimators: Number of trees.
      • max_features: Features considered for splitting (default: sqrt(n_features)).
      • bootstrap: Whether to use bootstrapping.
  1. AdaBoost:

    • Boosting: Sequentially trains weak learners (e.g., shallow trees), weighting misclassified samples higher.
    • Hyperparameters:

      • n_estimators: Number of weak learners.
      • learning_rate: Shrinks contribution of each tree.
  1. Gradient Boosting (GBM, XGBoost, LightGBM):

    • Boosting: Builds trees to correct errors of previous trees.
    • Hyperparameters:

      • learning_rate: Step size shrinkage.
      • n_estimators: Number of boosting stages.

E. Neural Networks (MLP)

F. k-Nearest Neighbors (k-NN)

G. Perceptron

wi=wi+η(y−y^)xiw_i = w_i + \eta (y - \hat{y}) x_i

where η\eta = learning rate.


4. Unsupervised Learning

Key Algorithms

A. Clustering

  1. K-Means:

    • Objective: Minimize within-cluster sum of squares (WCSS).
    • Steps:

      1. Initialize centroids randomly.
      2. Assign points to nearest centroid.
      3. Update centroids as mean of assigned points.
      4. Repeat until convergence.
    • Hyperparameters:

      • n_clusters: Number of clusters (kk).
      • Elbow Method: Plot WCSS vs. kk to find optimal kk.
  1. Hierarchical Clustering:

    • Linkage Methods:

      • Single Linkage: Min distance between clusters.
      • Complete Linkage: Max distance between clusters.
      • Average Linkage: Average distance between clusters.
      • Ward’s Linkage: Minimizes variance when merging clusters.
  1. DBSCAN (Density-Based):

    • Groups points based on density.
    • Hyperparameters:

      • eps: Max distance between points to be considered neighbors.
      • min_samples: Min points to form a dense region.

B. Dimensionality Reduction


5. Model Evaluation & Metrics

Key Concepts

Accuracy=TP+TNTP+TN+FP+FN\text{Accuracy} = \frac{TP + TN}{TP + TN + FP + FN}
Precision=TPTP+FP\text{Precision} = \frac{TP}{TP + FP}
Recall=TPTP+FN\text{Recall} = \frac{TP}{TP + FN}
F1=2×Precision×RecallPrecision+RecallF1 = 2 \times \frac{\text{Precision} \times \text{Recall}}{\text{Precision} + \text{Recall}}
MSE=1n∑i=1n(yi−y^i)2\text{MSE} = \frac{1}{n} \sum_{i=1}^n (y_i - \hat{y}_i)^2
R2=1−SSresSStotR^2 = 1 - \frac{\text{SS}_{\text{res}}}{\text{SS}_{\text{tot}}}

where SSres=∑(yi−y^i)2\text{SS}_{\text{res}} = \sum (y_i - \hat{y}_i)^2, SStot=∑(yi−yˉ)2\text{SS}_{\text{tot}} = \sum (y_i - \bar{y})^2.


6. Hyperparameter Tuning

Key Methods


7. Incremental Learning

Key Concepts


8. Ensemble Methods

Key Concepts


9. Text Feature Extraction

Key Methods

TF-IDF(t,d)=TF(t,d)×log⁡(NDF(t))\text{TF-IDF}(t, d) = \text{TF}(t, d) \times \log \left( \frac{N}{\text{DF}(t)} \right)

where:


10. Model Interpretation

Key Concepts


Graph 1: Data Preprocessing Workflow

Graph 2: Supervised Learning Algorithms

Graph 3: Unsupervised Learning

Graph 4: Model Evaluation & Tuning

Graph 5: Ensemble Methods

Graph 6: Neural Networks (MLP)

Graph 7: Text Feature Extraction