Unit 3: Non-parametric classification and Ensemble Models - Practice Quiz

INT394 — Machine Learning Algorithms 50 Questions
0 Correct 0 Wrong 50 Left
0/50

1 Which of the following statements best describes K-Nearest Neighbours (KNN)?

A. It is a probabilistic algorithm based on Bayes' Theorem.
B. It is a Lazy learning algorithm that stores the dataset and performs computation only during prediction.
C. It is an Eager learning algorithm that builds a model during training.
D. It is a linear regression model used for classification.

2 In the K-Nearest Neighbours algorithm, what happens when the value of is very small (e.g., )?

A. The decision boundary becomes smooth.
B. The model captures noise in the training data, leading to overfitting.
C. The model will always predict the majority class of the entire dataset.
D. The model becomes very simple and has high bias.

3 Which distance metric is most commonly used in KNN for continuous variables, defined as ?

A. Hamming Distance
B. Manhattan Distance
C. Minkowski Distance
D. Euclidean Distance

4 Why is feature scaling (normalization/standardization) important in KNN?

A. To prevent the algorithm from running too slowly.
B. To convert all categorical variables into numbers.
C. It is not required for KNN.
D. Because KNN is based on distance metrics, and features with larger scales will dominate the distance calculation.

5 What is the primary disadvantage of KNN as the dataset size grows?

A. Training time becomes exponentially high.
B. It cannot handle multi-class classification.
C. It requires too many hyperparameters.
D. Prediction time becomes very slow because it scans the entire dataset.

6 Which of the following is a specific strategy to choose the optimal value of in KNN?

A. Always choose equal to the square root of the number of features.
B. Always choose .
C. Use Cross-Validation (e.g., Elbow method) to minimize error.
D. Choose the largest odd number possible.

7 In a Decision Tree, what does a leaf node represent?

A. A decision rule.
B. The root of the tree.
C. A test on a specific attribute.
D. A class label or a continuous value.

8 Decision Trees are considered 'greedy' algorithms. What does this mean?

A. They consume a lot of memory.
B. They revisit previous decisions to optimize the structure.
C. They require all features to be used in the tree.
D. They make the locally optimal choice at each step with the hope of finding a global optimum.

9 Which metric does the ID3 algorithm use to select the best attribute for splitting?

A. Gain Ratio
B. Information Gain
C. Gini Index
D. Chi-Square

10 If a dataset has a completely homogeneous distribution (all examples belong to one class), what is its Entropy?

A. Undefined
B.
C.
D.

11 Calculate the Entropy of a binary classification problem where (positive probability) is and (negative probability) is .

A.
B.
C.
D.

12 What is a major drawback of using Information Gain (as in ID3)?

A. It is biased towards attributes with a large number of distinct values.
B. It is computationally expensive.
C. It only works for regression.
D. It cannot handle binary data.

13 Which algorithm was introduced to overcome the bias of Information Gain towards attributes with many values?

A. CART
B. KNN
C. ID3
D. C4.5

14 Which impurity measure is used by the CART (Classification and Regression Trees) algorithm?

A. T-test
B. Entropy
C. Gini Index
D. Log-Loss

15 What is the range of the Gini Index for a binary classification problem?

A.
B.
C.
D.

16 How does the CART algorithm handle splits?

A. It splits based on the highest standard deviation.
B. It creates multi-way splits based on all categories.
C. It does not split; it uses clustering.
D. It produces only binary splits (two child nodes).

17 What is the primary purpose of 'Pruning' in Decision Trees?

A. To reduce the complexity of the tree and prevent overfitting.
B. To increase the depth of the tree.
C. To add more features to the dataset.
D. To speed up the training process.

18 Which of the following describes 'Pre-pruning'?

A. Growing the full tree and then removing nodes.
B. Halt the construction of the tree early if goodness measures fall below a threshold.
C. Using ensemble methods instead of a single tree.
D. Converting the tree into rules.

19 Which of the following is a technique used in Post-pruning?

A. Maximum Leaf Nodes
B. Cost Complexity Pruning (Weakest Link Pruning)
C. Minimum Samples Split
D. Maximum Depth limiting

20 Handling missing values in C4.5 involves:

A. Replacing missing values with the global mean.
B. Distributing the instance to all child nodes with weights proportional to the population of the child nodes.
C. Stopping the algorithm.
D. Deleting the rows with missing values.

21 Which of the following scenarios suggests a Decision Tree is overfitting?

A. High training error, low testing error.
B. High training error, high testing error.
C. Low training error, high testing error.
D. Low training error, low testing error.

22 What is the main idea behind Ensemble Learning?

A. To find the single best algorithm for a problem.
B. To unsupervisedly cluster data.
C. To combine multiple weak models to create a strong predictive model.
D. To reduce the size of the dataset.

23 Ensemble methods generally aim to reduce which two sources of error?

A. Computation and Memory
B. False Positives and False Negatives
C. Bias and Variance
D. Precision and Recall

24 Which ensemble method relies on 'Bootstrap Aggregating'?

A. Bagging
B. Stacking
C. Boosting
D. Cascading

25 In Bagging, how are the datasets for the individual models created?

A. By splitting the data into disjoint folds.
B. By sampling with replacement from the original dataset.
C. By sampling without replacement.
D. By selecting only the difficult instances.

26 Random Forest is a modification of Bagging. What specific feature does it add?

A. It selects a random subset of features for splitting at each node.
B. It performs post-pruning on all trees.
C. It boosts the weight of misclassified samples.
D. It uses neural networks as base learners.

27 What is Out-of-Bag (OOB) error in Random Forests?

A. The error calculated after pruning.
B. The error calculated on the data samples that were not included in the bootstrap sample for a specific tree.
C. The error due to missing values.
D. The error calculated on the validation set.

28 Which of the following is true about Boosting algorithms?

A. Models are trained sequentially, with each correcting the errors of the predecessor.
B. Models are trained in parallel.
C. It does not use weights for instances.
D. It increases the variance of the model.

29 In AdaBoost (Adaptive Boosting), how are weights updated?

A. Weights are assigned randomly.
B. Weights of misclassified instances are increased.
C. All weights remain constant.
D. Weights of correctly classified instances are increased.

30 What is the key difference between Bagging and Boosting regarding Bias and Variance?

A. Both reduce only bias.
B. Bagging reduces variance; Boosting primarily reduces bias.
C. Bagging reduces bias; Boosting reduces variance.
D. Both reduce only variance.

31 Gradient Boosting differs from AdaBoost in that it:

A. Cannot handle regression problems.
B. Uses a voting mechanism.
C. Optimizes a loss function by training new models on the residual errors of previous models.
D. Updates instance weights directly.

32 What is 'Stacking' (Stacked Generalization)?

A. Combining multiple weak learners using a simple average.
B. A method to stack data vertically.
C. Using a stack data structure for decision trees.
D. Training a meta-model to learn how to combine the predictions of base models.

33 In the context of Ensemble voting, what is 'Hard Voting'?

A. Selecting the class predicted by the most complex model.
B. Averaging the probabilities.
C. Selecting the class with the majority of votes from the classifiers.
D. Using a weighted average.

34 What is 'Soft Voting'?

A. Random selection.
B. Selecting the majority class.
C. Voting only on easy instances.
D. Averaging the predicted class probabilities and choosing the class with the highest average probability.

35 Which algorithm is a popular implementation of Gradient Boosting?

A. C4.5
B. K-Means
C. XGBoost
D. Apriori

36 The 'Curse of Dimensionality' negatively impacts KNN because:

A. KNN cannot handle more than 3 dimensions.
B. In high-dimensional space, data becomes sparse, and all points tend to be equidistant.
C. It reduces the number of features.
D. It increases the bias.

37 When building a decision tree for regression (e.g., CART), what is the typical splitting criterion?

A. Gain Ratio
B. Gini Index
C. Sum of Squared Errors (Variance reduction)
D. Information Gain

38 Can Decision Trees typically handle both numerical and categorical data?

A. No, only numerical.
B. No, only categorical.
C. Yes, they can handle both.
D. Only if converted to binary.

39 What is the definition of a 'Weak Learner' in boosting?

A. A model that performs slightly better than random guessing.
B. A model that takes a long time to train.
C. A model that is underfitted.
D. A model with 100% accuracy.

40 In ID3, what is the formula for Information Gain given Entropy ?

A.
B.
C.
D.

41 Which of the following is NOT an ensemble method?

A. Gradient Boosting Machines
B. AdaBoost
C. Logistic Regression
D. Random Forest

42 Why does Random Forest generally perform better than a single Decision Tree?

A. It is easier to interpret.
B. It uses a deeper tree structure.
C. It requires less training data.
D. It reduces the risk of overfitting by averaging multiple trees.

43 What is the role of the 'Learning Rate' in Gradient Boosting?

A. It determines the size of the tree.
B. It determines the number of neighbors in KNN.
C. It sets the initial weights of the data points.
D. It scales the contribution of each tree to the final prediction.

44 In the context of Weighted Majority Voting (Ensemble), how is the final prediction made?

A. The model with the highest weight decides alone.
B. All models have equal say.
C. Models are assigned weights based on their performance (e.g., accuracy), and the weighted sum determines the class.
D. The user manually selects the best model.

45 Which distance metric corresponds to norm?

A. Minkowski Distance
B. Euclidean Distance
C. Chebyshev Distance
D. Manhattan Distance

46 If a Decision Tree is fully grown until every leaf is pure, what is the likely outcome?

A. Low Variance
B. High Variance (Overfitting)
C. Underfitting
D. High Bias

47 Which algorithm uses the concept of 'Stump' (a one-level decision tree) as its typical weak learner?

A. AdaBoost
B. Stacking
C. Random Forest
D. KNN

48 How does 'Averaging' differ from 'Voting' in ensembles?

A. They are exactly the same.
B. Averaging is for classification; Voting is for regression.
C. Averaging is used only in Boosting.
D. Averaging is for regression; Voting is for classification.

49 Which equation represents the Gini Index for a node with class probabilities ?

A.
B.
C.
D.

50 What is the primary benefit of Stacking over Voting/Averaging?

A. It is faster to train.
B. It does not require a validation set.
C. It requires fewer base models.
D. It learns the optimal combination of base models rather than assuming equal or fixed weights.