Decision Trees, Confusion Matrix, and Evaluation Metrics | MCQs

Q. What kind of decision boundaries do decision trees produce?
A) Linear
B) Non-linear ✅
C) Circular
D) Sigmoidal


Q. Which algorithm uses entropy for attribute selection?
A) C4.5
B) CART
C) ID3 ✅
D) KNN


Q. Which impurity measure does the CART algorithm use?
A) Entropy
B) Gain Ratio
C) Gini Impurity ✅
D) Log Loss


Q. What is the purpose of pruning in decision trees?
A) Increase model accuracy
B) Handle missing values
C) Reduce overfitting ✅
D) Add more splits


Q. What is the main limitation of using Information Gain in ID3?
A) Prefers numerical attributes
B) Biased towards attributes with many values ✅
C) Cannot handle continuous data
D) Doesn't split the data


Q. Which algorithm uses Gain Ratio to avoid bias in attribute selection?
A) CART
B) C4.5 ✅
C) ID3
D) SVM


Q. What is recursive partitioning in decision trees?
A) Merging nodes
B) Backpropagation
C) Dividing dataset based on attribute values ✅
D) Repeating training


Q. Which method stops tree growth before complete fitting?
A) Post-pruning
B) Pre-pruning ✅
C) Ensemble
D) Bootstrapping


Q. Which of the following is true about decision trees?
A) Always produces a linear classifier
B) Cannot handle missing values
C) Is a black box model
D) Produces interpretable rules ✅


Q. What does TDIDT stand for in tree induction?
A) Tree-Driven Interactive Decision Trees
B) Top-Down Induction of Decision Trees ✅
C) Terminal Decision Interactive Data Tree
D) Top Data Interactive Decision Tree


Q. What does TP represent in a confusion matrix?
A) False detection of positives
B) Correctly predicted positives ✅
C) Incorrectly predicted negatives
D) Total positives


Q. What are False Negatives (FN)?
A) Correctly predicted positives
B) Incorrectly predicted negatives ✅
C) Correctly predicted negatives
D) All predicted as positive


Q. In a confusion matrix, which is the actual negative but predicted positive?
A) True Positive
B) True Negative
C) False Negative
D) False Positive ✅


Q. What value shows how often the model gets it right?
A) Sensitivity
B) Specificity
C) Accuracy ✅
D) Recall


Q. Accuracy is calculated using which formula?
A) (TP + FN) / Total
B) (TP + TN) / Total ✅
C) TP / (TP + FP)
D) TP / (TP + TN)


Q. Which metric focuses on correctly identifying positive class?
A) Specificity
B) Sensitivity ✅
C) Error rate
D) Precision


Q. What does specificity measure?
A) True positive rate
B) False negative rate
C) True negative rate ✅
D) False positive rate


Q. Error rate is calculated as:
A) (TP + TN) / Total
B) 1 – accuracy ✅
C) FN / Total
D) FP / Total


Q. A high recall but low precision means:
A) The model rarely detects positives
B) The model predicts too few positives
C) The model predicts too many false positives ✅
D) The model is accurate


Q. Precision is the ratio of:
A) TP / (TP + FN)
B) TP / (TP + FP) ✅
C) TN / (TN + FP)
D) TN / (TP + TN)


Q. Recall is also known as:
A) Accuracy
B) Specificity
C) Sensitivity ✅
D) Error rate


Q. The F1-score is:
A) Geometric mean of precision and recall
B) Harmonic mean of precision and recall ✅
C) Arithmetic mean of TP and TN
D) Precision squared


Q. If precision is 80% and recall is 60%, what can we say?
A) Model favors completeness
B) Model is missing many actual positives ✅
C) Model favors specificity
D) F1-score will be 100%


Q. What is the perfect F1-score value?
A) 0
B) 0.5
C) 1.0 ✅
D) ∞


Q. Precision emphasizes:
A) How many actual positives were found
B) How many predicted positives were correct ✅
C) All true predictions
D) Negative classes


Q. What does entropy measure in data?
A) Mean
B) Variance
C) Randomness ✅
D) Sample size


Q. Which entropy level indicates high predictability?
A) High entropy
B) Low entropy ✅
C) Infinite entropy
D) Zero entropy


Q. Information Gain is calculated by:
A) Entropy of parent - weighted entropy of children ✅
B) Gini - entropy
C) Accuracy - specificity
D) Precision - recall


Q. Information gain favors attributes with:
A) Fewer values
B) More distinct values ✅
C) Numeric values only
D) Boolean values


Q. Gain ratio adjusts for:
A) Data normalization
B) Number of splits in an attribute ✅
C) Mean shift
D) Zero entropy


Q. What does Gini impurity indicate?
A) Class imbalance
B) Misclassification probability ✅
C) Random noise
D) Tree depth


Q. Which formula represents Gini Index?
A) 1 – Σ (pi^2) ✅
B) –Σ (pi * log pi)
C) pi / total
D) Entropy * Gain


Q. What is the ideal value of Gini impurity for a pure node?
A) 1
B) 0 ✅
C) 0.5
D) ∞


Q. What does pruning help prevent?
A) Underfitting
B) Overfitting ✅
C) High bias
D) Missing values


Q. Which is a type of pruning method?
A) Random split
B) Pre-pruning ✅
C) Gini cutoff
D) Tree boosting


Q. Post-pruning involves:
A) Building partial tree
B) Validating after full tree creation ✅
C) Skipping entropy
D) Avoiding attribute selection


Q. Which is a method to handle missing values at training time?
A) Discard the row
B) Replace with 0
C) Use most common value ✅
D) Use random value


Q. At inference time, missing attribute value can be handled by:
A) Ignoring the node
B) Exploring all child branches and aggregating prediction ✅
C) Skipping prediction
D) Assigning random prediction


Q. In the example confusion matrix, how many actual positive (buy_computer = yes) samples were predicted correctly?
A) 46
B) 412
C) 6954 ✅
D) 2588


Q. In the same matrix, how many actual negative (buy_computer = no) samples were misclassified as positive?
A) 2588
B) 412 ✅
C) 46
D) 6954


Q. Total number of samples in the dataset is:
A) 10,000 ✅
B) 9,000
C) 7,366
D) 2,634


Q. How is the accuracy of this classifier calculated?
A) (6954 + 2588) / 10000 ✅
B) (412 + 46) / 10000
C) (6954 + 46) / 10000
D) 6954 / 10000


Q. What is the error rate of the classifier?
A) (412 + 46) / 10000 ✅
B) (6954 + 46) / 10000
C) 1 - 0.9
D) (2588 + 6954) / 10000


Q. Given: TP=90, FN=210, FP=140, TN=9560. What is the sensitivity (recall)?
A) 70%
B) 90%
C) 30% ✅
D) 96.4%


Q. Given the same values, what is the specificity?
A) 95%
B) 98.56% ✅
C) 30%
D) 90%


Q. What is the total number of actual positives (cancer=yes)?
A) 230
B) 9770
C) 300 ✅
D) 90


Q. Precision in this example is:
A) 30.00%
B) 90/230 = 39.13% ✅
C) 90/300
D) 140/9700


Q. Overall accuracy is:
A) 90 / 230
B) (90 + 9560) / 10000 = 96.4% ✅
C) 98.56%
D) 30.00%


Q. How are continuous values handled in decision trees?
A) They are ignored
B) Treated as categorical
C) Split using optimal midpoint ✅
D) Rounded off


Q. Which method is used to determine split point for continuous attributes?
A) Median split
B) Mean split
C) Midpoint between adjacent sorted values ✅
D) Mode-based threshold


Q. What happens after finding the best split point?
A) Tree is pruned
B) Attribute is dropped
C) Data is divided into ≤ and > groups ✅
D) Random decision is made


Q. What is the formula for midpoint between two values ai and ai+1?
A) ai – ai+1
B) (ai + ai+1)/2 ✅
C) ai * ai+1
D) ai/ai+1


Q. Why shouldn't we simply discard rows with missing data?
A) It's fast
B) It increases overfitting
C) It loses too much information ✅
D) It reduces entropy


Q. What is one basic method to handle missing values during training?
A) Delete the whole column
B) Use median
C) Replace with most common value ✅
D) Replace with random number


Q. Another advanced strategy for handling missing data is:
A) Impute with average
B) Set all values to zero
C) Use most probable value based on class label ✅
D) Skip training


Q. What’s a robust method involving multiple instances for handling missing values?
A) Add a row per missing entry with each possibility ✅
B) Drop missing values
C) Use gain ratio
D) Replace with null


Q. At inference time, how is missing value at a decision node handled?
A) Skip that node
B) Halt prediction
C) Explore all branches and aggregate using weighted vote ✅
D) Replace with mean


Q. Tree stops splitting if:
A) Samples in node are equal in size
B) All samples in node belong to one class ✅
C) All attributes are continuous
D) Gini is 1


Q. What is the fallback if there are no attributes left to split on?
A) Discard node
B) Guess the class
C) Use majority class for leaf ✅
D) Set to null


Q. When do we say there are no more samples to split?
A) Entropy becomes zero
B) No information gain
C) Data set is empty ✅
D) Gain ratio is 1


Q. Why is class imbalance a problem in classification?
A) It improves accuracy
B) It makes models ignore the majority class
C) Models may ignore the minority class ✅
D) No effect on metrics


Q. Which metric is most affected by imbalanced data?
A) Accuracy ✅
B) Specificity
C) Precision
D) Tree depth


Q. What is a common domain where class imbalance occurs?
A) Stock market
B) Sentiment analysis
C) Fraud detection ✅
D) Weather forecasting


Q. What does the F1-score represent?
A) Maximum of precision and recall
B) Average of sensitivity and specificity
C) Harmonic mean of precision and recall ✅
D) Difference between recall and precision


Q. Which F1-score value indicates a perfect classifier?
A) 0
B) 1 ✅
C) 0.5
D) -1


Q. If a model has high precision but low recall, its F1-score will be:
A) High
B) Low ✅
C) Exactly 1
D) Not affected


Q. What does entropy measure in a dataset?
A) Tree height
B) Information gain
C) Data randomness ✅
D) Accuracy


Q. What does low entropy indicate?
A) High randomness
B) Low accuracy
C) Greater predictability ✅
D) High overfitting


Q. Which algorithm uses information gain for attribute selection?
A) CART
B) C4.5
C) ID3 ✅
D) Random Forest


Q. Information gain is highest for an attribute when:
A) Data is uniform
B) Entropy doesn’t change
C) Attribute causes maximum entropy reduction ✅
D) Attribute is continuous


Q. Which type of attribute does information gain prefer?
A) Attributes with few values
B) Continuous attributes
C) Multi-valued attributes ✅
D) Binary attributes


Q. Why is gain ratio used instead of information gain in C4.5?
A) Faster computation
B) Bias towards binary attributes
C) To handle multi-valued attribute bias ✅
D) To increase recall


Q. SplitInfo is used in calculating:
A) Entropy
B) Gain ratio ✅
C) Accuracy
D) Gini impurity


Q. Gini impurity is used in which algorithm?
A) ID3
B) Naive Bayes
C) CART ✅
D) K-means


Q. Which value of Gini impurity is ideal for a pure node?
A) 0 ✅
B) 1
C) 0.5
D) -1


Q. How does Gini impurity differ from entropy?
A) It penalizes outliers
B) It's slower
C) It avoids logarithmic operations ✅
D) It only works on binary data


Q. Why is pruning used in decision trees?
A) To increase tree depth
B) To reduce training data
C) To avoid overfitting ✅
D) To increase entropy


Q. What is pre-pruning?
A) Removing irrelevant attributes
B) Stopping tree before full growth ✅
C) Splitting based on weighted vote
D) Normalizing entropy


Q. Post-pruning happens:
A) Before training
B) During attribute selection
C) After building full tree ✅
D) Before inference


Q. Which pruning method removes non-leaf nodes to reduce overfitting?
A) Pre-pruning
B) Attribute merging
C) Post-pruning ✅
D) Information splitting


Q. What does TDIDT stand for?
A) Tree-Driven Information Distribution Technique
B) Top-Down Induction of Decision Trees ✅
C) Total Data Into Decision Trees
D) Training Data In Decision Trees


Q. Which approach does TDIDT use?
A) Bottom-up
B) Breadth-first
C) Recursive top-down ✅
D) Naive Bayes


Q. Recursive partitioning ends when:
A) Tree height exceeds threshold
B) No more samples or attributes ✅
C) Gini impurity is 0.5
D) Entropy increases


Q. Decision trees produce decision boundaries that are:
A) Linear
B) Circular
C) Non-linear ✅
D) Irregular


Q. Non-linear decision boundaries are better for:
A) Linearly separable problems
B) Complex datasets ✅
C) High-bias models
D) Uniform distributions


Q. Which metric focuses on the correctness of positive predictions?
A) Recall
B) Accuracy
C) Precision ✅
D) Specificity


Q. Which metric is best when false negatives are more costly?
A) Precision
B) Recall ✅
C) Specificity
D) Accuracy


Q. Which metric evaluates how many negatives were correctly predicted?
A) Precision
B) Specificity ✅
C) Recall
D) Entropy


Q. Which of the following increases when both precision and recall increase?
A) Error Rate
B) Sensitivity
C) F1 Score ✅
D) Entropy


Q. Which is a problem when accuracy is the only metric used?
A) Precision decreases
B) Overfitting increases
C) Class imbalance is hidden ✅
D) Sensitivity increases


Q. Which tree-based algorithm uses pruning by default?
A) ID3
B) C4.5 ✅
C) Naive Bayes
D) K-means


Q. Which algorithm prefers attributes with higher split information?
A) ID3
B) C4.5 ✅
C) CART
D) SVM


Q. Which attribute selection measure is less biased towards multi-valued attributes?
A) Information Gain
B) Gain Ratio ✅
C) Entropy
D) Gini Impurity


Q. What is the output of a decision tree classifier?
A) Cluster ID
B) Class Label ✅
C) Probability
D) Confidence interval


Q. Which method can be used for both regression and classification?
A) ID3
B) CART ✅
C) KNN
D) Naive Bayes


Q. Which of the following is used to evaluate a classifier’s performance visually?
A) Entropy Graph
B) ROC Curve ✅
C) Decision Table
D) Tree Height Plot


Q. Which method handles missing values during prediction?
A) Weighted branch voting ✅
B) Attribute deletion
C) Gini skipping
D) Default class fallback


Q. Which metric would be most useful for spam detection?
A) Accuracy
B) Precision ✅
C) Specificity
D) Gain ratio


Q. A dataset with 90% 'no' and 10% 'yes' classes is an example of:
A) Well-balanced dataset
B) Overfitting
C) Class imbalance ✅
D) Pruned tree


Q. Decision trees are:
A) Parametric models
B) Non-parametric models ✅
C) Linear classifiers
D) Deep neural nets


Q. What is the ideal value of entropy for a pure node?
A) 1
B) 0 ✅
C) 0.5
D) -1


Q. What is the effect of overfitting on decision trees?
A) Improves generalization
B) Reduces accuracy on test set ✅
C) Increases entropy
D) Simplifies the model


Q. A tree that classifies training data perfectly but fails on test data is:
A) Pruned
B) Overfitted ✅
C) Regularized
D) Undertrained


Q. Which splitting criterion is used in ID3?
A) Gini Impurity
B) Gain Ratio
C) Information Gain ✅
D) Entropy Deviation


Q. Which splitting criterion is used in CART?
A) Entropy
B) Gini Impurity ✅
C) Gain Ratio
D) Mutual Information

Previous Post Next Post