Unit 3 - Practice Quiz

INT394 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 an Eager learning algorithm that builds a model during training.
B. It is a Lazy learning algorithm that stores the dataset and performs computation only during prediction.
C. It is a probabilistic algorithm based on Bayes' Theorem.
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 will always predict the majority class of the entire dataset.
C. The model becomes very simple and has high bias.
D. The model captures noise in the training data, leading to overfitting.

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

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

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

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

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. Prediction time becomes very slow because it scans the entire dataset.
D. It requires too many hyperparameters.

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. Choose the largest odd number possible.
C. Use Cross-Validation (e.g., Elbow method) to minimize error.
D. Always choose .

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

A. The root of the tree.
B. A decision rule.
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 make the locally optimal choice at each step with the hope of finding a global optimum.
B. They revisit previous decisions to optimize the structure.
C. They consume a lot of memory.
D. They require all features to be used in the tree.

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

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

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

A. Undefined
B. $0$
C. $0.5$
D. $1$

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

A. $0.5$
B. $0$
C. $2$
D. $1$

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

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

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

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

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

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

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

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

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

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

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

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

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

20 Handling missing values in C4.5 involves:

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

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

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

22 What is the main idea behind Ensemble Learning?

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

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

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

24 Which ensemble method relies on 'Bootstrap Aggregating'?

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

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

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

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

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

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

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

28 Which of the following is true about Boosting algorithms?

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

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

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

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

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

31 Gradient Boosting differs from AdaBoost in that it:

A. Uses a voting mechanism.
B. Cannot handle regression problems.
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. Training a meta-model to learn how to combine the predictions of base models.
B. Using a stack data structure for decision trees.
C. A method to stack data vertically.
D. Combining multiple weak learners using a simple average.

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

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

34 What is 'Soft Voting'?

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

35 Which algorithm is a popular implementation of Gradient Boosting?

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

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

A. In high-dimensional space, data becomes sparse, and all points tend to be equidistant.
B. KNN cannot handle more than 3 dimensions.
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. Gini Index
B. Information Gain
C. Gain Ratio
D. Sum of Squared Errors (Variance reduction)

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

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

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

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

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. Logistic Regression
B. Random Forest
C. Gradient Boosting Machines
D. AdaBoost

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

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

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 scales the contribution of each tree to the final prediction.
D. It sets the initial weights of the data points.

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

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

45 Which distance metric corresponds to norm?

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

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

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

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

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

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

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

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 does not require a validation set.
B. It requires fewer base models.
C. It is faster to train.
D. It learns the optimal combination of base models rather than assuming equal or fixed weights.