ML Study Hub

Home / Past papers / MLP End Term / this paper

IIT M DIPLOMA AN1 EXAM ETD1 11 Dec 2022 - 11 Dec 2022

MLP End Term38 questions100 marks29 MCQ · 5 MSQ · 4 SADiploma
Elapsed 00:00
Q1MCQ2 marks
What will be the shape of X and y? question figure What will be the shape of X and y?
  1. (120,90) and (120,)
  2. (120,10) and (120,)
  3. (90,120) and (90,)
  4. (90,10) and (90,)
Q2MCQ2 marks
What will be the shape of the feature matrix (X.shape) and the label vector (y.shape) for the following block of code? question figure What will be the shape of the feature matrix (X.shape) and the label vector (y.shape) for the following block of code?
  1. (699, 1) and (599, 1)
  2. (500, 1) and (500, 1)
  3. (1, 500) and (1,500)
  4. (599, 1) and (699, 1)
Q3MCQ2 marks
What will be the output of the following code? question figure What will be the output of the following code?
  1. Bunch, Tuple, DataFrame, DataFrame
  2. Bunch, Tuple, DataFrame, Tuple
  3. Bunch, Bunch, Bunch, Bunch
  4. DataFrame, DataFrame, DataFrame, DataFrame
  5. Bunch, Ndarray, Bunch, Ndarray
  6. It will result into an error.
Q4MCQ2 marks
Consider following code snippet: question figure Consider following code snippet: Above classifier uses:
  1. hinge but quadratically penalized.
  2. logistic regression.
  3. linear SVM.
  4. None of these.
  5. perceptron.
Q5MCQ2 marks
Which of the following Naive Bayes algorithms can be applied if the data has discrete features that are categorically distributed?
  1. GaussianNB
  2. CategoricalNB
  3. ComplementNB
  4. None of these
Q6MCQ2 marks
Which of the following options represents the correct output of the following block of code? question figure Which of the following options represents the correct output of the following block of code?
  1. [0]
  2. [2]
  3. [1.5]
  4. [1]
Q7MCQ2 marks
Which of the following estimators implement partial_fit method in Regression?
  1. Ridge Regression
  2. SGDRegressor
  3. Linear Regression
  4. Polynomial Regression
Q8MCQ2 marks
Mention which of the following statement(s) is / are correct? Statement 1: Incremental learning is a dynamic technique which is applied when training data becomes available gradually over time or its size is out of system memory limits. Statement 2: Sklearn can not process large data in batches.
  1. Statement 1 is correct but statement 2 is incorrect.
  2. Statement 1 is incorrect but statement 2 is correct.
  3. Statement 1 and statement 2 both are incorrect.
  4. Statement 1 and statement 2 both are correct.
Q9MCQ2 marks
Which of the following options represents the correct value of gamma for SVC_classifier = SVC(gamma = ’auto’)?
  1. question figure
  2. question figure
  3. question figure
  4. question figure
Q10MCQ2 marks
Consider the following scatter plots of four different input datasets: question figure Consider the following scatter plots of four different input datasets: Which data will be classified better using gaussian rbf kernel?
  1. Data 1
  2. Data 3
  3. Data 4
  4. Data 2
Q11MCQ2 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.
Q12MCQ2 marks
Which of the following is/are Correct for K-means algorithm.
  1. The algorithm is sensitive to outliers.
  2. It terminates at a local optimum if SSE is used.
  3. k-means is considered to be a linear algorithm.
  4. All of these
Q13MCQ2 marks
Hierarchical Clustering can also be called:
  1. Centroid Based Clustering
  2. Distribution-based Clustering
  3. Density-based Clustering
  4. Connectivity-Based Clustering
Q14MSQ2 marksselect all that apply
Which of the following options represents the major difference between HashingVectorizer and CountVectorizer?
  1. CountVectorizer does not store vocabulary, its object takes less spacecompared to HashingVectorizer
  2. HashingVectorizer does not store vocabulary, its object takes less spacecompared to CountVectorizer
  3. CountVectorizer alleviates any dependence with function calls performed onthe previous chunk of data in case of incremental learning
  4. HashingVectorizer alleviates any dependence with function calls performed onthe previous chunk of data in case of incremental learning
Q15MSQ2 marksselect all that apply
Which of the following statements correctly set L1 penalty to 0.2 and L2 Penalty to 0.8 in LogisticRegression?
  1. question figure
  2. question figure
  3. question figure
  4. question figure
Q16MSQ2 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
Q17MSQ3 marksselect all that apply
Which of the following statements are incorrect about the AUC?
  1. The ROC curve plots sensitivity (recall) on the x-axis against specificity on the y-axis
  2. A completely effective classifier is a diagonal line, and it will have an AUC of0.5.
  3. The larger the value of AUC, the less effective the classifier.
  4. An AUC of 1 indicates a perfect classifier, which means it gets all the 1scorrectly classified, and doesn’t misclassify any 0s as 1s.
  5. None of these
Q18SA3 marks
The output of the following block of code will be: question figure The output of the following block of code will be:
Q19SA3 marks
Refer the dataframe(df) given below and enter the correct output (up to 2 decimal points) for the following block of code: question figure Refer the dataframe(df) given below and enter the correct output (up to 2 decimal points) for the following block of code:
Q20SA3 marks
Enter the output (up to 2 decimal points) for the following block of code. question figure Enter the output (up to 2 decimal points) for the following block of code.
Q21SA3 marks
What is the correct output of the following block of code? [Note: LinearSVC implements “one-vs-the-rest” multi-class strategy] question figure What is the correct output of the following block of code? [Note: LinearSVC implements “one-vs-the-rest” multi-class strategy]
Q22MCQ3 marks
Which of the following options represents all the correct precision, Recall, and accuracy values for the confusion matrix shown in Figure 1? [Note: All 3 values should be correct in the same option] question figure Which of the following options represents all the correct precision, Recall, and accuracy values for the confusion matrix shown in Figure 1? [Note: All 3 values should be correct in the same option]
  1. Precision: 0.833 , Recall: 0.875, Accuracy: 0.833
  2. Precision: 0.875, Recall: 0.833, Accuracy: 0.833
  3. Precision: 0.9783, Recall: 0.9281, Accuracy: 0.909
  4. None of these
Q23MCQ3 marks
Consider the following code snippet: question figure Consider the following code snippet: which of the following could be the correct output?
  1. array([[1., 2., 1., 4., 2., 1.], [1., 2., 1., 4., 2., 1.]])
  2. array([[1., 2., 1., 4., 2., 1., 4., 4., 2., 1.], [1., 2., 1., 4., 2., 1., 4., 4., 2., 1.]])
  3. array([[1., 2., 1., 2.], [1., 2., 1., 2.]])
  4. array([[1., 2., 1., 4., 2., 1., 8., 4., 2., 1.], [1., 2., 1., 4., 2., 1., 8., 4., 2., 1.]])
Q24MCQ3 marks
Which of the following is likely to be the correct output of the code given below? question figure Which of the following is likely to be the correct output of the code given below?
  1. [0.95238095, 0. ]
  2. [0.85,0.1,0.05]
  3. [2,3,1]
  4. [0.85,0]
  5. There are some mistakes in the 3rd /4th line of code, hence it will produceerror.
Q25MCQ3 marks
Which of the following is likely to be the correct output of the code given below? question figure Which of the following is likely to be the correct output of the code given below?
  1. 5
  2. 99
  3. Given code will produce an error
  4. 0.82
Q26MCQ3 marks
Mention whether the following statements are TRUE or FALSE . Statement 1 : ‘In order to extend ROC curve and ROC area to multi-label classification, it is necessary to binarize the output.‘ Statement 2: In SGDClassifier, setting warm_start=True does not retain the weight values of the model after max_iter and hence does not produce different results for each execution.‘
  1. Statement 1 is correct but statement 2 is incorrect.
  2. Statement 1 is incorrect but statement 2 is correct.
  3. Statement 1 and statement 2 both are incorrect.
  4. Statement 1 and statement 2 both are correct.
Q27MCQ3 marks
Which of the following options represents the correct option to set the regularization rate in RidgeClassifier?
  1. question figure
  2. question figure
  3. question figure
  4. question figure
Q28MCQ3 marks
Which of the following options represents the correct output for the following block of code? question figure Which of the following options represents the correct output for the following block of code?
  1. (11, 1)
  2. (1, 10)
  3. (1, 11)
  4. (10, 1)
Q29MCQ3 marks
Which of the following options represents the correct output for the following block of code? question figure Which of the following options represents the correct output for the following block of code?
  1. array([, ’is’, ’name’, ’the’], dtype=object)
  2. array([’bond’, ’is’, ’james’, ’name’, ’the’,’ !’], dtype=object)
  3. array([’bond’, ’bond’, ’is’, ’james’, ’name’, ’the’], dtype=object)
  4. array([’bond’, ’is’, ’james’, ’name’, ’the’], dtype=object)
Q30MCQ3 marks
Which of the following options represents the correct output of the following block of code? question figure Which of the following options represents the correct output of the following block of code?
  1. array([2])
  2. array([1.5])
  3. array([1])
  4. array([0])
Q31MCQ3 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
Q32MCQ3 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
Q33MCQ3 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.
Q34MCQ3 marks
question figure
  1. (784, 100)
  2. (784, 1)
  3. (1, 784)
  4. (100, 784)
Q35MCQ4 marks
Which of the following options represents the correct output of the following block of code? question figure Which of the following options represents the correct output of the following block of code?
  1. 1
  2. 0
  3. 0.110
  4. 0.223
  5. 0.533
Q36MCQ4 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
Comprehension passage - the questions below it refer to this
Go through the code snippet given below and answer the subquestions. question figure Go through the code snippet given below and answer the subquestions.
Q37MSQ3 marksselect all that apply
Based on the given code,Select all option Which will be considered as input alpha value for our RidgeCV estimator.
  1. 0.055
  2. 0.05
  3. 0.905
  4. 0.1
  5. 1
Q38MCQ3 marks
Which of the following could be the possible output of print(results.best_score_)?
  1. 1
  2. -2999.79
  3. 0.528
  4. 0.681

Answer key

  1. Q1 (MCQ, 2 marks): A
  2. Q2 (MCQ, 2 marks): B
  3. Q3 (MCQ, 2 marks): C
  4. Q4 (MCQ, 2 marks): C
  5. Q5 (MCQ, 2 marks): B
  6. Q6 (MCQ, 2 marks): B
  7. Q7 (MCQ, 2 marks): B
  8. Q8 (MCQ, 2 marks): A
  9. Q9 (MCQ, 2 marks): C
  10. Q10 (MCQ, 2 marks): A
  11. Q11 (MCQ, 2 marks): A
  12. Q12 (MCQ, 2 marks): D
  13. Q13 (MCQ, 2 marks): D
  14. Q14 (MSQ, 2 marks): C, D
  15. Q15 (MSQ, 2 marks): A
  16. Q16 (MSQ, 2 marks): B, C
  17. Q17 (MSQ, 3 marks): A, C
  18. Q18 (SA, 3 marks): 4
  19. Q19 (SA, 3 marks): 22.95 to 23.05
  20. Q20 (SA, 3 marks): 0.75
  21. Q21 (SA, 3 marks): 4
  22. Q22 (MCQ, 3 marks): A
  23. Q23 (MCQ, 3 marks): A
  24. Q24 (MCQ, 3 marks): A
  25. Q25 (MCQ, 3 marks): D
  26. Q26 (MCQ, 3 marks): A
  27. Q27 (MCQ, 3 marks): D
  28. Q28 (MCQ, 3 marks): B
  29. Q29 (MCQ, 3 marks): D
  30. Q30 (MCQ, 3 marks): A
  31. Q31 (MCQ, 3 marks): A
  32. Q32 (MCQ, 3 marks): A
  33. Q33 (MCQ, 3 marks): D
  34. Q34 (MCQ, 3 marks): A
  35. Q35 (MCQ, 4 marks): D
  36. Q36 (MCQ, 4 marks): A
  37. Q37 (MSQ, 3 marks): A, C
  38. Q38 (MCQ, 3 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 core topics, concepts, principles, and equations essential for the "Diploma Level: Machine Learning Practice" exam, followed by Mermaid knowledge graphs to visualize relationships.



Core Topics & Concepts

1. Data Handling & Preprocessing


2. Supervised Learning


3. Unsupervised Learning


4. Model Evaluation & Selection


5. Ensemble Methods


6. Specialized Topics


7. Mathematical Equations

ConceptEquation
Linear Regressiony=wTx+by = w^T x + b
Ridge Regressionmin⁡w∥Xw−y∥22+α∥w∥22\min_w \|Xw - y\|_2^2 + \alpha \|w\|_2^2
Lasso Regressionmin⁡w∥Xw−y∥22+α∥w∥1\min_w \|Xw - y\|_2^2 + \alpha \|w\|_1
Logistic RegressionP(y=1)=σ(wTx)P(y=1) = \sigma(w^T x), where σ\sigma is the sigmoid function.
SVM (Primal)min⁡w12∥w∥2+C∑max⁡(0,1−yiwTxi)\min_w \frac{1}{2} \|w\|^2 + C \sum \max(0, 1 - y_i w^T x_i)
SVM (RBF Kernel)K(xi,xj)=exp⁡(−γ∥xi−xj∥2)K(x_i, x_j) = \exp(-\gamma \|x_i - x_j\|^2)
Decision Tree SplitΔImpurity=I(parent)−NleftNI(left)−NrightNI(right)\Delta \text{Impurity} = I(\text{parent}) - \frac{N_\text{left}}{N} I(\text{left}) - \frac{N_\text{right}}{N} I(\text{right})
Gini ImpurityIG=1−∑pi2I_G = 1 - \sum p_i^2
EntropyIH=−∑pilog⁡piI_H = -\sum p_i \log p_i
PrecisionPrecision=TPTP+FP\text{Precision} = \frac{TP}{TP + FP}
RecallRecall=TPTP+FN\text{Recall} = \frac{TP}{TP + FN}
F1 Score2×Precision×RecallPrecision+Recall2 \times \frac{\text{Precision} \times \text{Recall}}{\text{Precision} + \text{Recall}}
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)
AUC-ROCAUC=∫TPR d(FPR)\text{AUC} = \int \text{TPR} \, d(\text{FPR})
K-Means Objectivemin⁡∑i=1n∥xi−μci∥2\min \sum_{i=1}^n \|x_i - \mu_{c_i}\|^2
Polynomial Featuresϕ(x)=[1,x1,x2,x12,x1x2,x22]\phi(x) = [1, x_1, x_2, x_1^2, x_1x_2, x_2^2] for degree=2.

2. Unsupervised Learning Relationships

3. Model Evaluation & Selection

4. Data Preprocessing Pipeline

5. Ensemble Methods

6. Incremental Learning