ML Study Hub

Home / Past papers / MLP End Term / this paper

IIT M IMPROVEMENT FN EXAM QDD1 22 Dec - 22 Dec 2024

MLP End Term37 questions100 marks21 MCQ · 12 MSQ · 4 SAImprovement / forenoon / QDD1
Elapsed 00:00
Comprehension passage - the questions below it refer to this
Based on the above data, answer the given subquestions. question figure
Q1MCQ1 mark
Which of the following commands will return the average age of employees?
  1. question figure
  2. question figure
  3. question figure
  4. question figure
Q2MSQ3 marksselect all that apply
Which of the following commands will return the number of employees in the 'HR ’ department?
  1. question figure
  2. question figure
  3. question figure
  4. question figure
  5. question figure
Q3MSQ3 marksselect all that apply
Which of the following methods can be used to filter employees with a salary greater than 50,000?
  1. question figure
  2. question figure
  3. question figure
  4. question figure
Q4MCQ1 mark
What does the following code return? question figure What does the following code return?
  1. The row with the employee who has the lowest performance score.
  2. The row with the employee who has the highest performance score.
  3. The row with the highest salary.
  4. None of these.
Q5MCQ4 marks
Which of the following code snippets will plot the learning curve for training over 100 epochs? Assume that all necessary imports, parameter settings, and initializations are correctly done, and the variable names suggest the data they hold or point to.
  1. question figure
  2. question figure
  3. question figure
  4. question figure
  5. question figure
Q6MCQ4 marks
question figure
  1. 8
  2. 16
  3. 32
  4. 100
Q7MCQ3 marks
Consider the following code: question figure Consider the following code:
  1. question figure
  2. question figure
  3. question figure
Q8MCQ3 marks
question figure
  1. question figure
  2. question figure
  3. question figure
  4. question figure
Q9MCQ3 marks
question figure
  1. question figure
  2. question figure
  3. question figure
  4. question figure
Q10MCQ3 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.
Q11MCQ3 marks
question figure
  1. The number of base estimators to be trained.
  2. The size of each sample batch for testing.
  3. The maximum number of features used for training.
  4. The number of samples to draw from X to train each base estimator
Q12MCQ3 marks
question figure
  1. Performs hierarchical clustering and outputs cluster distances.
  2. Outputs the silhouette score for the data points.
  3. Groups data points into 2 clusters and outputs the labels of the clusters foreach data point.
  4. Reduces the dimensionality of the dataset to 2 dimensions.
Q13MCQ3 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.
Q14MCQ2 marks
What will be the output of the following code? question figure What will be the output of the following code?
  1. 4
  2. 5
  3. 3
  4. 6
Q15MCQ2 marks
What will be the output of the following code? question figure What will be the output of the following code?
  1. [5, 6]
  2. [4, 5]
  3. [3, 4]
  4. [2, 3]
Q16MCQ2 marks
You have loaded a dataset with 500 samples and 50 features into a Pandas DataFrame. Some samples have missing values for a few features. If you want to remove rows with more than 5 missing values, what method would you use?
  1. question figure
  2. question figure
  3. question figure
  4. question figure
  5. question figure
Q17MCQ2 marks
question figure
  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
Q18MCQ2 marks
question figure
  1. question figure
  2. question figure
  3. question figure
  4. question figure
Q19MCQ2 marks
What will be the output of the code? question figure
  1. 1.25
  2. 2.56
  3. 4.25
  4. 3.25
  5. Given code will return an error.
Q20MCQ2 marks
question figure
  1. It adjusts the learning rate based on the number of iterations.
  2. It specifies the learning rate to decrease as the model converges.
  3. It specifies the fraction of the dataset used for each step in the stochasticgradient descent.
  4. It defines the initial value for the learning rate and keeps it constantthroughout training.
Q21MCQ2 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
Q22MCQ2 marks
question figure
  1. question figure
  2. question figure
  3. question figure
  4. question figure
  5. question figure
  6. question figure
Q23MCQ2 marks
question figure
  1. It decreases the variance among individual trees.
  2. It increases 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.
Q24MSQ4 marksselect all that apply
Consider the following code: question figure Consider the following code:
  1. [47, 31, 18, 95, 77]
  2. [31, 41, 85, 31]
  3. [47, 31, 18]
  4. [47, 31, 85, 77]
  5. [31, 41, 18, 95, 85, 77]
  6. [18, 95, 85, 77]
Q25MSQ4 marksselect all that apply
question figure
  1. question figure
  2. question figure
  3. question figure
  4. question figure
Q26MSQ4 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
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. GaussianNB
  2. LogisticRegression
  3. SGDClassifier
  4. RandomForestClassifier
Q29MSQ3 marksselect all that apply
question figure
  1. question figure
  2. question figure
  3. question figure
  4. question figure
Q30MSQ3 marksselect all that apply
What parameters of the k-means clustering algorithm should be tuned to optimize the model performance?
  1. question figure
  2. question figure
  3. question figure
  4. question figure
Q31MSQ3 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
Q32MSQ3 marksselect all that apply
Which of the following statements are correct about the Silhouette Coefficient?
  1. It measures how well each sample is clustered.
  2. A higher score indicates better-defined clusters.
  3. It requires ground truth labels (target variable) to compute.
  4. It can be used to evaluate the quality of any clustering algorithm.
Q33MSQ2 marksselect all that apply
question figure
  1. question figure
  2. question figure
  3. question figure
  4. question figure
  5. question figure
Q34SA3 marks
question figure
Q35SA3 marks
What will be the output of the following code snippet? question figure What will be the output of the following code snippet?
Q36SA3 marks
question figure
Q37SA2 marks
question figure

Answer key

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

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), along with Mermaid knowledge graphs to visualize relationships.



1. Core Topics & Concepts

A. Data Preprocessing

Key Concepts:

  1. Handling Missing Data

    • df.dropna(thresh=N): Drops rows with fewer than N non-NaN values.
    • df.fillna(value): Fills missing values.
  2. Feature Scaling

    • StandardScaler: Standardizes features (mean=0, std=1).

      • Formula:
z=x−μσz = \frac{x - \mu}{\sigma}
xscaled=x−xminxmax−xminx_{\text{scaled}} = \frac{x - x_{\text{min}}}{x_{\text{max}} - x_{\text{min}}}
  1. Encoding Categorical Data

    • OneHotEncoder: Converts categorical features into binary columns.

      • Example: ['cat', 'dog'] → [[1, 0], [0, 1]].
    • LabelEncoder: Converts categories to integers (e.g., ['cat', 'dog'] → [0, 1]).
  2. Polynomial Features

    • PolynomialFeatures(degree=N): Generates polynomial combinations up to degree N.

      • Example: X = [a, b] → [1, a, b, a², ab, b²] for degree=2.

Key Pandas/NumPy Commands:

TaskCommand
Compute mean of a columndf['column'].mean()
Filter rowsdf[df['Salary'] > 50000]
Count values in a columndf['Department'].value_counts()['HR']
Sort by a columndf.sort_values(by='Score', ascending=False)
Select top row after sortingdf.sort_values(...).iloc[0]

B. Supervised Learning

1. Linear Models

y=β0+β1x1+β2x2+⋯+βnxn+ϵy = \beta_0 + \beta_1 x_1 + \beta_2 x_2 + \dots + \beta_n x_n + \epsilon
σ(z)=11+e−z\sigma(z) = \frac{1}{1 + e^{-z}}

2. Decision Trees

Leaf nodes=2max_depth\text{Leaf nodes} = 2^{\text{max\_depth}}

3. Ensemble Methods

4. Neural Networks (MLPClassifier/MLPRegressor)


5. Model Evaluation

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}}}
Log Loss=−1N∑i=1Nyilog⁡(y^i)+(1−yi)log⁡(1−y^i)\text{Log Loss} = -\frac{1}{N} \sum_{i=1}^N y_i \log(\hat{y}_i) + (1 - y_i) \log(1 - \hat{y}_i)

C. Unsupervised Learning

1. Clustering (K-Means)

Silhouette Score=b−amax⁡(a,b)\text{Silhouette Score} = \frac{b - a}{\max(a, b)}

2. Dimensionality Reduction


D. Hyperparameter Tuning

1. Grid Search (GridSearchCV)

2. Randomized Search (RandomizedSearchCV)


E. Incremental Learning


F. Feature Selection


2. Key Equations

ConceptEquation
Linear Regressiony=β0+β1x1+⋯+βnxn+ϵy = \beta_0 + \beta_1 x_1 + \dots + \beta_n x_n + \epsilon
Logistic Regressionσ(z)=11+e−z\sigma(z) = \frac{1}{1 + e^{-z}}
MSEMSE=1n∑(yi−y^i)2\text{MSE} = \frac{1}{n} \sum (y_i - \hat{y}_i)^2
R² ScoreR2=1−SSresSStotR^2 = 1 - \frac{\text{SS}_{\text{res}}}{\text{SS}_{\text{tot}}}
Standard Scalingz=x−μσz = \frac{x - \mu}{\sigma}
MinMax Scalingxscaled=x−xminxmax−xminx_{\text{scaled}} = \frac{x - x_{\text{min}}}{x_{\text{max}} - x_{\text{min}}}
Log Loss−1N∑yilog⁡(y^i)+(1−yi)log⁡(1−y^i)-\frac{1}{N} \sum y_i \log(\hat{y}_i) + (1 - y_i) \log(1 - \hat{y}_i)
Silhouette Scoreb−amax⁡(a,b)\frac{b - a}{\max(a, b)}
Gini ImpurityG=1−∑pi2G = 1 - \sum p_i^2
EntropyH=−∑pilog⁡(pi)H = -\sum p_i \log(p_i)

Graph 2: Supervised Learning Models

Graph 3: Model Evaluation

Graph 4: Unsupervised Learning

Graph 5: Hyperparameter Tuning

Graph 6: Incremental Learning


4. Exam Tips

  1. Pandas/NumPy:

    • Know how to filter (df[df['Salary'] > 50000]), sort (sort_values), and aggregate (groupby, mean).
    • Understand dropna and fillna.
  2. Scikit-Learn:

    • Memorize key methods: fit, predict, transform, fit_transform, score.
    • Know which models support partial_fit (e.g., SGDClassifier, GaussianNB).
  3. Decision Trees:

    • Understand how max_depth, min_samples_split, and criterion affect the tree.
    • Calculate max leaf nodes: 2max_depth2^{\text{max\_depth}}.
  4. Evaluation Metrics:

    • For regression: MSE, R².
    • For classification: accuracy, precision, recall, F1, ROC-AUC, log loss.
  5. Clustering:

    • Use the elbow method or silhouette score to choose k.
    • Know that K-Means requires predefined n_clusters.
  6. Hyperparameter Tuning:

    • GridSearchCV vs. RandomizedSearchCV: trade-off between exhaustiveness and efficiency.
  7. Neural Networks:

    • hidden_layer_sizes=(5, 3) means 2 hidden layers with 5 and 3 neurons.
    • alpha controls regularization (higher = less overfitting).