ML Study Hub

Home / Past papers / MLP End Term / this paper

IIT M FOUNDATION DIPLOMA AN EXAM - 22 Dec 2024

MLP End Term38 questions100 marks24 MCQ · 11 MSQ · 3 SAFoundation / Diploma / afternoon
Elapsed 00:00
Q1MCQ2 marks
question figure
  1. 4
  2. 5
  3. 3
  4. 6
Q2MCQ2 marks
question figure
  1. [5, 6]
  2. [4, 5]
  3. [8, 6]
  4. [2, 3]
Q3MCQ2 marks
You have loaded a dataset with 1000 samples and 20 features into a Pandas DataFrame. Some samples have missing values for a few features. If you want to remove rows with fewer than 15 non-null values, what method would you use?
  1. question figure
  2. question figure
  3. question figure
  4. question figure
  5. question figure
Q4MCQ2 marks
question figure
  1. 1.25
  2. 2.56
  3. 4.25
  4. 1.12
  5. Given code will return an error.
Q5MCQ2 marks
question figure
  1. It adjusts the learning rate based on the number of iterations.
  2. It defines the initial value for the learning rate and keeps it constantthroughout training.
  3. It determines the maximum step size allowed during training.
  4. It specifies the fraction of the dataset used for each step in the stochasticgradient descent.
Q6MCQ2 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.
Q7MCQ2 marks
question figure
  1. The percentage of training samples used to train each base estimator.
  2. The number of base estimators trained on subsets of the training data.
  3. The maximum number of features used by each base estimator duringtraining.
  4. The total number of samples used to train all base estimators combined.
Q8MCQ2 marks
question figure
  1. It increases the variance among individual trees.
  2. It decreases the variance among individual trees.
  3. It reduces the number of samples used for training each tree.
  4. It reduces overfitting by restricting tree depth.
Q9MCQ2 marks
question figure
  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.
Q10MCQ2 marks
question figure
  1. It increases the model’s capacity to fit the training data closely, potentiallycausing overfitting.
  2. It adds a stronger regularization term to the loss function, reducing themodel’s complexity and helping prevent overfitting.
  3. It makes the model more prone to overfitting by increasing its sensitivity tonoise in the training data.
  4. It directly affects the learning rate, controlling how fast the model convergesduring training.
Q11MCQ2 marks
Consider the following two statements and select the correct answer: 1. Statement 1: The multinomial Naive Bayes classifier is suitable for classification with discrete features 2. Statement 2: Two dependent features do not impact GaussianNB performance because internally it calculates the conditional probability independently for each feature.
  1. Both statements are True
  2. Only statement 1 is True
  3. Only statement 2 is True
  4. Both statements are False
Q12MCQ3 marks
question figure
  1. question figure
  2. question figure
  3. question figure
  4. question figure
Q13MCQ3 marks
question figure
  1. question figure
  2. question figure
  3. question figure
  4. question figure
Q14MCQ3 marks
question figure
  1. s1 = s2
  2. s1 < s2
  3. s1 > s2
Q15MCQ3 marks
question figure
  1. question figure
  2. question figure
  3. question figure
  4. question figure
  5. question figure
Q16MCQ3 marks
question figure
  1. [0]
  2. [1]
  3. [0.5]
  4. [2]
Q17MCQ3 marks
question figure
  1. Output score is likely to increase.
  2. Output score is likely to decrease.
  3. Output score may increase or decrease depending on other factors.
  4. Output score will remain the same.
Q18MCQ3 marks
question figure
  1. Outputs the number of iterations and the final silhouette score of the clusters.
  2. Outputs the cluster labels for each data point and the maximum distancebetween clusters.
  3. Outputs the coordinates of the cluster centroids and the number of points ineach cluster.
  4. Outputs the coordinates of the cluster centroids and the sum of squareddistances of samples to their closest cluster center.
Q19MCQ3 marks
question figure
  1. question figure
  2. question figure
  3. question figure
  4. question figure
Q20MCQ3 marks
question figure
  1. question figure
  2. question figure
  3. question figure
  4. question figure
Q21MCQ3 marks
question figure
  1. question figure
  2. question figure
  3. question figure
  4. question figure
Q22MCQ4 marks
question figure
  1. 8
  2. 16
  3. 32
  4. 64
Q23MSQ2 marksselect all that apply
Which of the following are techniques for dimensionality reduction?
  1. PCA (Principal Component Analysis)
  2. StandardScaler
  3. Lasso Regression
  4. t-SNE (t-distributed Stochastic Neighbor Embedding)
Q24MSQ2 marksselect all that apply
question figure
  1. When data is streaming or generated incrementally.
  2. When the dataset is small.
  3. When the dataset cannot fit in memory.
  4. When the training labels are noisy.
Q25MSQ3 marksselect all that apply
question figure
  1. question figure
  2. question figure
  3. question figure
  4. question figure
Q26MSQ3 marksselect all that apply
question figure
  1. [1, 2, 3, 6, 7]
  2. [1, 2, 3, 4, 5, 7]
  3. [2, 4, 6, 8]
  4. [1, 2, 3, 6, 8, 9]
  5. [2, 5, 8]
  6. [4, 5, 6, 7, 8, 9]
Q27MSQ3 marksselect all that apply
question figure
  1. question figure
  2. question figure
  3. question figure
  4. question figure
Q28MSQ3 marksselect all that apply
question figure
  1. question figure
  2. question figure
  3. question figure
  4. question figure
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. The neural network contains 3 hidden layers with 5 neurons in each hiddenlayer
  2. The neural network contains 5 hidden layers with 3 neurons in each hiddenlayer
  3. The neural network contains 2 hidden layers with 3 neurons in the secondhidden layer
  4. The neural network contains 2 hidden layers with 5 neurons in the first hiddenlayer
  5. None of the given options are correct
Q31MSQ4 marksselect all that apply
question figure
  1. The number of samples at node N is 15. If split, the left child will have 10samples, and the right child will have 5 samples.
  2. The number of samples at node N is 8. If split, the left child will have 4samples, and the right child will have 4 samples.
  3. The number of samples at node N is 9. If split, the left child will have 2samples, and the right child will have 7 samples.
  4. The number of samples at node N is 14. If split, the left child will have 4samples, and the right child will have 10 samples.
  5. The number of samples at node N is 6. If split, the left child will have 3samples, and the right child will have 3 samples.
Q32SA3 marks
question figure
Q33SA3 marks
question figure
Q34SA3 marks
question figure
Comprehension passage - the questions below it refer to this
Based on the above data, answer the given subquestions question figure
Q35MCQ2 marks
Which of the following commands will return the total sales across all regions?
  1. question figure
  2. question figure
  3. question figure
  4. question figure
Q36MSQ2 marksselect all that apply
Which of the following commands will return the names of employees in the ”North” region?
  1. question figure
  2. question figure
  3. question figure
  4. question figure
Q37MSQ3 marksselect all that apply
Which of the following methods can be used to find the employee(s) with the highest sales?
  1. question figure
  2. question figure
  3. question figure
  4. question figure
Q38MCQ2 marks
question figure
  1. The total sales for each region.
  2. The average sales for each month.
  3. The average sales for each region.
  4. None of these.

Answer key

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

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 core topics, concepts, principles, and equations essential for the Diploma Level: Machine Learning Practice (Computer-Based Exam). The summary is organized by topic clusters for clarity, followed by Mermaid knowledge graphs to visualize relationships.



1. Data Preprocessing

Core Concepts

xscaled=x−μσx_{\text{scaled}} = \frac{x - \mu}{\sigma}
xscaled=x−xminxmax−xminx_{\text{scaled}} = \frac{x - x_{\text{min}}}{x_{\text{max}} - x_{\text{min}}}

Key Equations

MethodEquation
Standard Scalingx′=x−μσx' = \frac{x - \mu}{\sigma}
Min-Max Scalingx′=x−xminxmax−xminx' = \frac{x - x_{\text{min}}}{x_{\text{max}} - x_{\text{min}}}
Polynomial Featuresxnew=[1,x1,x2,x12,x1x2,x22]x_{\text{new}} = [1, x_1, x_2, x_1^2, x_1x_2, x_2^2] (degree=2)

2. Supervised Learning

Core Algorithms

Linear Models

Tree-Based Models

G=1−∑pi2G = 1 - \sum p_i^2

Support Vector Machines (SVM)

Neural Networks (MLPClassifier/MLPRegressor)

k-Nearest Neighbors (KNN)

Key Equations

ModelEquation
Linear Regressiony=wTx+by = w^T x + b
Logistic RegressionP(y=1)=11+e−(wTx+b)P(y=1) = \frac{1}{1 + e^{-(w^T x + b)}}
SVM (Hinge Loss)L=max⁡(0,1−y(wTx+b))L = \max(0, 1 - y(w^T x + b))
Gini ImpurityG=1−∑pi2G = 1 - \sum p_i^2
EntropyH=−∑pilog⁡piH = -\sum p_i \log p_i

3. Unsupervised Learning

Core Algorithms

Key Equations

MethodEquation
k-MeansJ=∑i=1k∑x∈Ci∥x−μi∥2J = \sum_{i=1}^k \sum_{x \in C_i} \|x - \mu_i\|^2 (inertia)
PCAXPCA=XWX_{\text{PCA}} = X W (where WW are eigenvectors of XTXX^T X)

4. Model Evaluation

Metrics

TaskMetrics
Regression- Mean Absolute Error (MAE): 1n∑∣yi−y^i∣\frac{1}{n} \sum |y_i - \hat{y}_i|
- Mean Squared Error (MSE): 1n∑(yi−y^i)2\frac{1}{n} \sum (y_i - \hat{y}_i)^2
- R² Score: 1−SSresSStot1 - \frac{\text{SS}_{\text{res}}}{\text{SS}_{\text{tot}}}
Classification- Accuracy: TP+TNTP+TN+FP+FN\frac{\text{TP} + \text{TN}}{\text{TP} + \text{TN} + \text{FP} + \text{FN}}
- Precision: TPTP+FP\frac{\text{TP}}{\text{TP} + \text{FP}}
- Recall: TPTP+FN\frac{\text{TP}}{\text{TP} + \text{FN}}
- F1 Score: 2×Precision×RecallPrecision+Recall2 \times \frac{\text{Precision} \times \text{Recall}}{\text{Precision} + \text{Recall}}
- ROC-AUC: Area under ROC curve (TPR vs. FPR).
- Log Loss: −1N∑yilog⁡(pi)+(1−yi)log⁡(1−pi)-\frac{1}{N} \sum y_i \log(p_i) + (1 - y_i) \log(1 - p_i)

Cross-Validation

Hyperparameter Tuning


5. Ensemble Methods

Core Concepts

MethodDescription
BaggingTrains multiple models on bootstrapped samples (e.g., BaggingClassifier).
- max_samples: Fraction of samples per estimator.
- n_estimators: Number of base models.
BoostingSequentially corrects errors (e.g., AdaBoost, Gradient Boosting).
- learning_rate: Controls contribution of each model.
StackingCombines predictions of multiple models via a meta-model.
VotingAverages predictions (hard/voting for classification, soft for regression).

Key Algorithms


6. Model Deployment & Incremental Learning

Core Concepts


7. Clustering Evaluation

MetricDescription
InertiaSum of squared distances to centroids (k-means).
Silhouette ScoreMeasures cohesion/separation: b−amax⁡(a,b)\frac{b - a}{\max(a, b)}, where aa = intra-cluster distance, bb = inter-cluster distance.
Elbow MethodPlot inertia vs. k; choose k at the "elbow".

8. Dimensionality Reduction

MethodUse Case
PCALinear reduction; maximizes variance.
t-SNENon-linear visualization (preserves local structure).
Lasso RegressionFeature selection via L1 regularization.

9. Handling Imbalanced Data


10. Python Libraries & Functions

Library/FunctionPurpose
sklearn.preprocessingScaling, encoding, polynomial features.
sklearn.model_selectionTrain-test split, cross-validation, hyperparameter tuning.
sklearn.ensembleRandom Forest, Gradient Boosting, Bagging.
sklearn.clusterk-Means, DBSCAN.
sklearn.decompositionPCA, t-SNE.
sklearn.metricsAccuracy, precision, recall, ROC-AUC, MSE, etc.
pandasData manipulation (dropna, groupby, query).
numpyNumerical operations.

Graph 2: Supervised Learning Algorithms

Graph 3: Model Evaluation & Tuning

Graph 4: Unsupervised Learning

Graph 5: Ensemble Methods

Graph 6: Neural Networks


Exam Tips

  1. Focus on Equations:

    • Memorize scaling formulas (Standard/Min-Max), loss functions (MSE, Log Loss, Hinge Loss), and metrics (Precision, Recall, F1, R²).
  2. Sklearn Syntax:

    • Know how to initialize, fit, and predict with models (e.g., model.fit(X_train, y_train)).
    • Understand hyperparameters (e.g., n_estimators, max_depth, learning_rate).
  3. Data Preprocessing:

    • When to use StandardScaler vs. MinMaxScaler.
    • How OneHotEncoder affects feature dimensions.
  4. Model Evaluation:

    • Difference between accuracy, precision, recall, and F1.
    • When to use ROC-AUC vs. Log Loss.
  5. Ensemble Methods:

    • Bagging vs. Boosting: Bagging reduces variance; boosting reduces bias.
    • Random Forest vs. Gradient Boosting: RF uses bagging; GB is sequential.
  6. Clustering:

    • k-Means: How to choose k (elbow method/silhouette score).
    • Inertia: Lower = better clustering.
  7. Dimensionality Reduction:

    • PCA: Explained variance ratio.
    • t-SNE: For visualization (non-linear).
  8. Incremental Learning:

    • Use partial_fit for streaming data (e.g., SGDClassifier).
  9. Pipelines:

    • Chain steps (e.g., Pipeline([('scaler', StandardScaler()), ('model', LogisticRegression())])).
  10. Common Pitfalls:

    • Data Leakage: Never scale/test on training data.
    • Overfitting: Use regularization (L1/L2) or cross-validation.
    • Class Imbalance: Use class_weight or resampling.