Notice: Due to an ongoing migration of our storage and publishing system, material requested since last month will not be uploaded for the time being, and new requests are paused. All existing notes remain available.
You're offline
Unit 3 MCQsNon-parametric classification and Ensemble Models
Which of the following statements best describes K-Nearest Neighbours (KNN)?
Not quite. Try another option.
Answer: It is a Lazy learning algorithm that stores the dataset and performs computation only during prediction.
KNN is a lazy learner (instance-based learning) because it does not learn a discriminative function from the training data but memorizes the training dataset instead.
Question 2 of 50
In the K-Nearest Neighbours algorithm, what happens when the value of is very small (e.g., )?
Not quite. Try another option.
Answer: The model captures noise in the training data, leading to overfitting.
With a very small (like ), the algorithm is highly sensitive to noise and local outliers, resulting in a complex decision boundary and overfitting (high variance).
Question 3 of 50
Which distance metric is most commonly used in KNN for continuous variables, defined as ?
Not quite. Try another option.
Answer: Euclidean Distance
The formula represents the Euclidean Distance, which is the straight-line distance between two points in Euclidean space.
Question 4 of 50
Why is feature scaling (normalization/standardization) important in KNN?
Not quite. Try another option.
Answer: Because KNN is based on distance metrics, and features with larger scales will dominate the distance calculation.
If one feature has a range of 0-1000 and another 0-1, the distance calculation will be heavily biased toward the first feature. Scaling ensures all features contribute equally.
Question 5 of 50
What is the primary disadvantage of KNN as the dataset size grows?
Not quite. Try another option.
Answer: Prediction time becomes very slow because it scans the entire dataset.
Since KNN is a lazy learner, the computational cost happens at the inference (prediction) stage. For every new query, it must calculate distances to all training points, making it slow for large datasets.
Question 6 of 50
Which of the following is a specific strategy to choose the optimal value of in KNN?
Not quite. Try another option.
Answer: Use Cross-Validation (e.g., Elbow method) to minimize error.
Cross-validation involves testing different values and selecting the one that minimizes the validation error rate to balance bias and variance.
Question 7 of 50
In a Decision Tree, what does a leaf node represent?
Not quite. Try another option.
Answer: A class label or a continuous value.
Leaf nodes (terminal nodes) represent the final outcome, which is a class label (in classification) or a numerical value (in regression).
Question 8 of 50
Decision Trees are considered 'greedy' algorithms. What does this mean?
Not quite. Try another option.
Answer: They make the locally optimal choice at each step with the hope of finding a global optimum.
A greedy algorithm makes the best immediate decision at the current node (e.g., best split) without considering future consequences, often leading to a suboptimal global tree but offering computational efficiency.
Question 9 of 50
Which metric does the ID3 algorithm use to select the best attribute for splitting?
Not quite. Try another option.
Answer: Information Gain
ID3 uses Information Gain, which relies on the reduction of Entropy, to determine the best attribute to split the data.
Question 10 of 50
If a dataset has a completely homogeneous distribution (all examples belong to one class), what is its Entropy?
Not quite. Try another option.
Answer:
Entropy measures impurity. If all examples are of the same class, there is no impurity/uncertainty, so Entropy is 0.
Question 11 of 50
Calculate the Entropy of a binary classification problem where (positive probability) is and (negative probability) is .
Not quite. Try another option.
Answer:
Using the formula , calculation: . This represents maximum impurity.
Question 12 of 50
What is a major drawback of using Information Gain (as in ID3)?
Not quite. Try another option.
Answer: It is biased towards attributes with a large number of distinct values.
Information Gain favors attributes like 'ID' or 'Date' which have unique values for every instance, resulting in pure but useless splits. This bias is corrected by Gain Ratio.
Question 13 of 50
Which algorithm was introduced to overcome the bias of Information Gain towards attributes with many values?
Not quite. Try another option.
Answer: C4.5
The C4.5 algorithm introduced Gain Ratio, which normalizes the Information Gain by the 'Split Info' (intrinsic information) to penalize attributes with many branches.
Question 14 of 50
Which impurity measure is used by the CART (Classification and Regression Trees) algorithm?
Not quite. Try another option.
Answer: Gini Index
CART uses the Gini Index (or Gini Impurity) to measure the likelihood of incorrect classification of a new instance if it were randomly classified according to the distribution of class labels.
Question 15 of 50
What is the range of the Gini Index for a binary classification problem?
Not quite. Try another option.
Answer:
For binary classification, Gini is . The minimum is (pure) and the maximum is (perfectly mixed, ; ).
Question 16 of 50
How does the CART algorithm handle splits?
Not quite. Try another option.
Answer: It produces only binary splits (two child nodes).
CART constructs binary trees. Even if a categorical attribute has multiple values, CART groups them into two subsets for the split.
Question 17 of 50
What is the primary purpose of 'Pruning' in Decision Trees?
Not quite. Try another option.
Answer: To reduce the complexity of the tree and prevent overfitting.
Pruning removes sections of the tree that provide little power to classify instances, thereby reducing complexity and improving generalization (preventing overfitting).
Question 18 of 50
Which of the following describes 'Pre-pruning'?
Not quite. Try another option.
Answer: Halt the construction of the tree early if goodness measures fall below a threshold.
Pre-pruning stops the tree generation process before it fully classifies the training set (e.g., max depth reached, min samples per split), whereas post-pruning cuts back a fully grown tree.
Question 19 of 50
Which of the following is a technique used in Post-pruning?
Not quite. Try another option.
Answer: Cost Complexity Pruning (Weakest Link Pruning)
Cost Complexity Pruning is a post-pruning method that adds a penalty for the number of terminal nodes to the error rate, removing subtrees that do not justify their complexity.
Question 20 of 50
Handling missing values in C4.5 involves:
Not quite. Try another option.
Answer: Distributing the instance to all child nodes with weights proportional to the population of the child nodes.
C4.5 handles missing attribute values by sending the instance down all branches, weighted by the probability of seeing that branch's value in the training data.
Question 21 of 50
Which of the following scenarios suggests a Decision Tree is overfitting?
Not quite. Try another option.
Answer: Low training error, high testing error.
Overfitting occurs when the model memorizes the training data (low training error) but fails to generalize to unseen data (high testing error).
Question 22 of 50
What is the main idea behind Ensemble Learning?
Not quite. Try another option.
Answer: To combine multiple weak models to create a strong predictive model.
Ensemble learning aggregates the predictions of multiple base estimators (weak learners) to improve generalizability and robustness over a single estimator.
Question 23 of 50
Ensemble methods generally aim to reduce which two sources of error?
Not quite. Try another option.
Answer: Bias and Variance
Ensembles aim to lower the Bias (error from erroneous assumptions) and Variance (sensitivity to small fluctuations in the training set).
Question 24 of 50
Which ensemble method relies on 'Bootstrap Aggregating'?
Not quite. Try another option.
Answer: Bagging
Bagging stands for Bootstrap Aggregating. It involves training models on random subsets of the data with replacement.
Question 25 of 50
In Bagging, how are the datasets for the individual models created?
Not quite. Try another option.
Answer: By sampling with replacement from the original dataset.
Bagging uses sampling with replacement, meaning the same data point can appear multiple times in a single training subset.
Question 26 of 50
Random Forest is a modification of Bagging. What specific feature does it add?
Not quite. Try another option.
Answer: It selects a random subset of features for splitting at each node.
Random Forest decorrelates the trees by considering only a random subset of features at each split, preventing a single dominant feature from dictating the structure of all trees.
Question 27 of 50
What is Out-of-Bag (OOB) error in Random Forests?
Not quite. Try another option.
Answer: The error calculated on the data samples that were not included in the bootstrap sample for a specific tree.
Since Bagging uses sampling with replacement, some data is left out for each tree. These OOB samples act as an internal validation set to estimate prediction error.
Question 28 of 50
Which of the following is true about Boosting algorithms?
Not quite. Try another option.
Answer: Models are trained sequentially, with each correcting the errors of the predecessor.
Boosting is a sequential process where subsequent models focus on the instances that were misclassified by previous models.
Question 29 of 50
In AdaBoost (Adaptive Boosting), how are weights updated?
Not quite. Try another option.
Answer: Weights of misclassified instances are increased.
AdaBoost increases the weights of misclassified instances so that the next weak learner focuses more on getting these difficult cases right.
Question 30 of 50
What is the key difference between Bagging and Boosting regarding Bias and Variance?
Bagging (like Random Forest) averages high-variance models to reduce variance. Boosting takes high-bias weak learners and improves them sequentially to reduce bias.
Question 31 of 50
Gradient Boosting differs from AdaBoost in that it:
Not quite. Try another option.
Answer: Optimizes a loss function by training new models on the residual errors of previous models.
Gradient Boosting uses a gradient descent approach. Instead of updating weights, it trains the next model to predict the residuals (errors) of the current ensemble.
Question 32 of 50
What is 'Stacking' (Stacked Generalization)?
Not quite. Try another option.
Answer: Training a meta-model to learn how to combine the predictions of base models.
Stacking involves training base models and then training a meta-learner (or blender) that takes the predictions of the base models as input features to make the final prediction.
Question 33 of 50
In the context of Ensemble voting, what is 'Hard Voting'?
Not quite. Try another option.
Answer: Selecting the class with the majority of votes from the classifiers.
Hard Voting predicts the final class label based on the mode (majority vote) of the class labels predicted by the individual classifiers.
Question 34 of 50
What is 'Soft Voting'?
Not quite. Try another option.
Answer: Averaging the predicted class probabilities and choosing the class with the highest average probability.
Soft Voting considers the confidence of the classifiers by averaging their probability outputs, often yielding better results than hard voting if the classifiers are well-calibrated.
Question 35 of 50
Which algorithm is a popular implementation of Gradient Boosting?
Not quite. Try another option.
Answer: XGBoost
XGBoost (eXtreme Gradient Boosting) is a highly efficient and scalable implementation of gradient boosting.
Question 36 of 50
The 'Curse of Dimensionality' negatively impacts KNN because:
Not quite. Try another option.
Answer: In high-dimensional space, data becomes sparse, and all points tend to be equidistant.
As dimensions increase, the volume of the space increases exponentially, making data sparse. Distance metrics lose meaning as the ratio of the distance to the nearest neighbor vs. the farthest neighbor approaches 1.
Question 37 of 50
When building a decision tree for regression (e.g., CART), what is the typical splitting criterion?
Not quite. Try another option.
Answer: Sum of Squared Errors (Variance reduction)
For regression trees, the goal is to minimize the variance within the nodes. This is usually measured by the Sum of Squared Errors (SSE) or Mean Squared Error.
Question 38 of 50
Can Decision Trees typically handle both numerical and categorical data?
Not quite. Try another option.
Answer: Yes, they can handle both.
Decision Trees are versatile and can natively handle both numerical and categorical attributes (though implementation details vary between ID3, C4.5, and CART).
Question 39 of 50
What is the definition of a 'Weak Learner' in boosting?
Not quite. Try another option.
Answer: A model that performs slightly better than random guessing.
In Boosting theory, a weak learner is a classifier that is only required to be slightly better than random chance (accuracy > 0.5 for binary classification).
Question 40 of 50
In ID3, what is the formula for Information Gain given Entropy ?
Not quite. Try another option.
Answer:
Information Gain is the entropy of the parent node minus the weighted sum of the entropy of the child nodes resulting from the split.
Question 41 of 50
Which of the following is NOT an ensemble method?
Not quite. Try another option.
Answer: Logistic Regression
Logistic Regression is a standalone parametric linear classification model, not an ensemble method.
Question 42 of 50
Why does Random Forest generally perform better than a single Decision Tree?
Not quite. Try another option.
Answer: It reduces the risk of overfitting by averaging multiple trees.
A single deep decision tree has high variance (overfitting). Random Forest averages many uncorrelated trees, effectively reducing variance and improving generalization.
Question 43 of 50
What is the role of the 'Learning Rate' in Gradient Boosting?
Not quite. Try another option.
Answer: It scales the contribution of each tree to the final prediction.
The learning rate (shrinkage) shrinks the contribution of each new tree added to the model. A lower learning rate requires more trees but usually leads to better generalization.
Question 44 of 50
In the context of Weighted Majority Voting (Ensemble), how is the final prediction made?
Not quite. Try another option.
Answer: Models are assigned weights based on their performance (e.g., accuracy), and the weighted sum determines the class.
In Weighted Voting, better-performing models are trusted more. Their votes are multiplied by a weight derived from their validation performance.
Question 45 of 50
Which distance metric corresponds to norm?
Not quite. Try another option.
Answer: Manhattan Distance
Manhattan Distance is the sum of absolute differences (), which corresponds to the norm.
Question 46 of 50
If a Decision Tree is fully grown until every leaf is pure, what is the likely outcome?
Not quite. Try another option.
Answer: High Variance (Overfitting)
A fully grown tree captures every distinct pattern and noise in the training data, leading to high variance and overfitting.
Question 47 of 50
Which algorithm uses the concept of 'Stump' (a one-level decision tree) as its typical weak learner?
Not quite. Try another option.
Answer: AdaBoost
AdaBoost typically uses Decision Stumps—trees with only one split—as the weak learners.
Question 48 of 50
How does 'Averaging' differ from 'Voting' in ensembles?
Not quite. Try another option.
Answer: Averaging is for regression; Voting is for classification.
Generally, Voting (counting discrete class labels) is used for classification tasks, while Averaging (taking the mean of numerical predictions) is used for regression tasks.
Question 49 of 50
Which equation represents the Gini Index for a node with class probabilities ?
Not quite. Try another option.
Answer:
The Gini Index is calculated by subtracting the sum of the squared probabilities of each class from one.
Question 50 of 50
What is the primary benefit of Stacking over Voting/Averaging?
Not quite. Try another option.
Answer: It learns the optimal combination of base models rather than assuming equal or fixed weights.
Stacking uses a meta-learner (second-level model) to learn the best way to combine predictions, effectively correcting biases that simple voting or averaging might miss.
That's unit 3
Answer a few questions and your score shows up here.
Nearly through. Did unit 3 of INT394 save you a night before the exam?
LPU Notes is free. A student pays for the servers.
Did unit 3 of INT394 save you a night before the exam?
Then you can help keep it free for the next batch. Ads cover part of the server bill;
the rest comes out of a student's own pocket: the domain, the storage, and keeping
the site up through the weeks everyone needs it at once.
The payment button didn't load. An ad blocker or a filtered network is the usual reason.
to try again.