Unit 3: SUPERVISED LEARNING: CLASSIFICATION - Practice Quiz

INT234 — Predictive Analytics 60 Questions
0 Correct 0 Wrong 60 Left
0/60

1 What is the main idea behind the -nearest neighbors method?

Lazy learning: Nearest neighbors Easy
A. Classify a point using nearby labeled points
B. Classify a point using random labels
C. Classify a point using a fixed equation
D. Classify a point using only the oldest data

2 In -nearest neighbors, what does represent?

Lazy learning: Nearest neighbors Easy
A. The number of classes in the target
B. The number of training passes performed
C. The number of nearest examples considered
D. The number of features in the dataset

3 Naïve Bayes is based mainly on which type of probability?

Naïve Bayes Easy
A. Uniform probability
B. Sequential probability
C. Geometric probability
D. Conditional probability

4 What simplifying assumption does Naïve Bayes make about features?

Naïve Bayes Easy
A. Features contain no missing values
B. Features must be measured in meters
C. Features always have equal values
D. Features are conditionally independent

5 What is the basic structure of a decision tree?

Divide and Conquer: Decision Trees and Rules Easy
A. Inputs, weights, and epochs
B. Vectors, margins, and kernels
C. Nodes, branches, and leaves
D. Rows, columns, and cells

6 In a decision tree, what does a leaf usually represent?

Divide and Conquer: Decision Trees and Rules Easy
A. A probability distribution only
B. A final class prediction
C. A distance calculation
D. A feature measurement

7 A decision rule commonly has which form?

Divide and Conquer: Decision Trees and Rules Easy
A. While a condition, repeat a dataset
B. If a condition, then an outcome
C. When a model ends, start training
D. For each row, remove a feature

8 What does a support vector machine try to find for classification?

Support vector machine Easy
A. A table containing only labels
B. A random sample of features
C. A list of missing observations
D. A boundary separating classes

9 In an SVM, what is the margin?

Support vector machine Easy
A. The number of classes in the dataset
B. The distance around the separating boundary
C. The percentage of missing values
D. The average value of the target

10 What does classification accuracy measure?

Accuracy Easy
A. The number of input variables
B. The proportion of correct predictions
C. The size of the training dataset
D. The proportion of positive predictions

11 If a classifier makes 90 correct predictions out of 100, what is its accuracy?

Accuracy Easy
A.
B.
C.
D.

12 What does logarithmic loss evaluate?

Logarithmic Loss Easy
A. The number of training features
B. The quality of predicted probabilities
C. The distance between data points
D. The number of tree branches

13 For logarithmic loss, which result is generally better?

Logarithmic Loss Easy
A. A smaller loss value
B. A larger loss value
C. A loss with no probability inputs
D. A loss equal to the sample size

14 What does the area under the ROC curve measure?

Area Under Curve Easy
A. How many features are selected
B. How quickly a tree is built
C. How many rows contain errors
D. How well classes are ranked

15 What does an AUC value of usually indicate?

Area Under Curve Easy
A. No positive examples in the data
B. Perfect classification performance
C. Performance similar to random ranking
D. A model with zero prediction errors

16 Precision answers which question?

Precision Easy
A. How many predicted positives are correct?
B. How many predictions are correct overall?
C. How many actual negatives are found?
D. How many actual positives are found?

17 Recall is also commonly called which of the following?

Recall Easy
A. Sensitivity
B. Accuracy
C. Error rate
D. Specificity

18 The F1 score combines which two measures?

F1 Score Easy
A. AUC and logarithmic loss
B. Precision and recall
C. Mean and standard deviation
D. Accuracy and specificity

19 What information is shown in a confusion matrix?

Confusion Matrix Easy
A. Training time and memory use
B. Feature names and data types
C. Model parameters and learning rates
D. Actual and predicted class counts

20 What is a true positive?

Confusion Matrix Easy
A. A positive case incorrectly predicted as negative
B. A positive case correctly predicted as positive
C. A negative case incorrectly predicted as positive
D. A negative case correctly predicted as negative

21 A 3-nearest neighbors classifier finds the three closest training instances with labels A, A, and B. Assuming uniform voting, how will the new instance be classified?

Lazy learning: Nearest neighbors Medium
A. Class B
B. Classification is impossible
C. Both classes equally
D. Class A

22 A dataset has two features: annual income measured in dollars and age measured in years. Before applying k-nearest neighbors with Euclidean distance, what is the most appropriate preprocessing step?

Lazy learning: Nearest neighbors Medium
A. Scale both features
B. Remove the income feature
C. Convert labels to distances
D. Sort examples by age

23 For a message containing words and , a Naïve Bayes classifier uses , , and , where means spam. What quantity is proportional to the posterior probability of spam?

Naïve Bayes Medium
A.
B.
C.
D.

24 In a text classifier, a word appears in a test document but never appeared in the training documents of one class. Which technique prevents that class probability from becoming zero?

Naïve Bayes Medium
A. Cost-complexity pruning
B. Majority voting
C. Laplace smoothing
D. Min-max scaling

25 A decision-tree node contains 40 positive and 40 negative examples. Split X produces two pure child nodes, while Split Y produces two child nodes with the same 50-50 class ratio as the parent. Which split has the larger information gain?

Divide and Conquer: Decision Trees and Rules Medium
A. Neither can be measured
B. Split Y
C. Both are equal
D. Split X

26 A fully grown decision tree achieves 100% training accuracy but performs poorly on validation data. Which modification is most likely to improve generalization?

Divide and Conquer: Decision Trees and Rules Medium
A. Remove stopping criteria
B. Apply tree pruning
C. Duplicate training rows
D. Increase maximum depth

27 A root-to-leaf path in a decision tree tests Age > 30, then Income > 50000, and predicts Approve. Which rule correctly represents this path?

Divide and Conquer: Decision Trees and Rules Medium
A. If income alone holds, approve
B. If either condition holds, approve
C. If both conditions hold, approve
D. If neither condition holds, approve

28 Two linear classifiers separate the training data perfectly. Classifier M has a wider margin between the classes than classifier N. Which classifier would a standard hard-margin support vector machine prefer?

Support vector machine Medium
A. Neither without probabilities
B. Classifier M
C. Either with equal preference
D. Classifier N

29 A dataset cannot be separated effectively by a straight line in its original feature space. Which SVM approach can create a nonlinear decision boundary without explicitly constructing all transformed features?

Support vector machine Medium
A. Bagging method
B. Kernel method
C. Majority method
D. Pruning method

30 A classifier produces , , , and . What is its accuracy?

Accuracy Medium
A.
B.
C.
D.

31 In a dataset where 98% of transactions are legitimate, a model predicts every transaction as legitimate and obtains 98% accuracy. What is the main limitation of using accuracy here?

Accuracy Medium
A. It measures ranking quality
B. It requires probability outputs
C. It ignores class imbalance
D. It excludes correct negatives

32 For a binary example whose true class is positive, a model predicts a positive-class probability of . Approximately what is the logarithmic loss for this example?

Logarithmic Loss Medium
A.
B.
C.
D.

33 Two models correctly classify the same positive example at a threshold of . Model A predicts , while Model B predicts . Which statement about their log losses is correct?

Logarithmic Loss Medium
A. Model B has lower loss
B. Both have equal loss
C. Loss depends only on threshold
D. Model A has lower loss

34 A classifier has an ROC AUC of . Which interpretation is most appropriate?

Area Under Curve Medium
A. It is 82% accurate at every threshold
B. It ranks a random positive above a random negative about 82% of the time
C. It predicts 82% of examples as positive
D. It has precision equal to 82%

35 Two positive examples receive scores and , while two negative examples receive scores and . Assuming no ties, what is the ROC AUC?

Area Under Curve Medium
A.
B.
C.
D.

36 A spam filter marks 40 messages as spam. Of these, 30 are actually spam. What is the filter's precision?

Precision Medium
A.
B.
C.
D.

37 A medical dataset contains 30 patients with a disease. A classifier correctly identifies 24 of them and misses 6. What is its recall for the disease class?

Recall Medium
A.
B.
C.
D.

38 A classifier has precision and recall . What is its F1 score?

F1 Score Medium
A.
B.
C.
D.

39 In a disease-detection confusion matrix, an infected patient is classified as healthy. How is this prediction recorded?

Confusion Matrix Medium
A. True positive
B. False negative
C. False positive
D. True negative

40 The decision threshold of a binary classifier is lowered from to . Assuming all predicted probabilities remain fixed, which change is generally expected in the confusion matrix?

Confusion Matrix Medium
A. Both TP and FP may increase
B. TP decreases while TN increases
C. FP decreases while FN increases
D. Both TN and FN may increase

41 A one-dimensional training set contains , , , and . Using 1-nearest-neighbor classification with Euclidean distance, what is the leave-one-out cross-validation accuracy?

Lazy learning: Nearest neighbors Hard
A.
B.
C.
D.

42 Independent, irrelevant binary features are appended to data used by a Euclidean -NN classifier. Each added feature is equally likely to match or differ between two observations. What is the most likely asymptotic effect as many such features are added?

Lazy learning: Nearest neighbors Hard
A. Cross-validation always selects
B. Class boundaries become linear in the enlarged space
C. Nearest and farthest distances become relatively similar
D. Nearest distances approach zero while farthest distances diverge

43 A binary feature is duplicated exactly, and both copies are supplied to a Naïve Bayes classifier. Assuming no smoothing issues, what is the principal consequence?

Naïve Bayes Hard
A. Its likelihood ratio is effectively counted twice
B. Its contribution disappears from the posterior
C. Its likelihood ratio is cancelled by normalization
D. Its class-conditional probability becomes one-half

44 For classes and , suppose , , , , and . Under the Naïve Bayes assumption, what is ?

Naïve Bayes Hard
A.
B.
C.
D.

45 A node contains positive and negative examples. A split produces children with class counts and , where each pair is (positive, negative). Using base-2 entropy, what is the information gain?

Divide and Conquer: Decision Trees and Rules Hard
A. Approximately
B. Approximately
C. Approximately
D. Approximately

46 A dataset contains all four combinations of two binary attributes , with target , and each combination occurs equally often. What happens if a greedy tree algorithm stops whenever no candidate split has positive information gain?

Divide and Conquer: Decision Trees and Rules Hard
A. It requires a depth-3 tree to represent the target
B. It selects either attribute and immediately classifies perfectly
C. It obtains positive gain only by duplicating the records
D. It stops at the root despite a perfect depth-2 tree

47 Positive examples are and , while negative examples are and . For a hard-margin linear SVM in canonical form , which parameters define the maximum-margin separator?

Support vector machine Hard
A.
B.
C.
D.

48 Every training observation is duplicated exactly times in the soft-margin SVM objective , while is left unchanged. Relative to the original dataset, this is equivalent to using which penalty parameter?

Support vector machine Hard
A.
B.
C.
D.

49 A classifier has sensitivity and specificity . It is deployed where the positive-class prevalence is . Assuming these rates remain stable, what is its expected accuracy?

Accuracy Hard
A.
B.
C.
D.

50 For three labels , the true label sets are , , and . Predictions are , , and . What is the multilabel subset accuracy?

Accuracy Hard
A.
B.
C.
D.

51 For binary observations with labels , a model assigns positive-class probabilities . Using natural logarithms, what is the mean logarithmic loss?

Logarithmic Loss Hard
A. Approximately
B. Approximately
C. Approximately
D. Approximately

52 Among observations with identical features, the true conditional positive rate is . Which constant predicted probability uniquely minimizes the expected binary logarithmic loss for these observations?

Logarithmic Loss Hard
A.
B.
C.
D.

53 Three positive examples receive scores , and three negative examples receive scores . Treating a tied positive-negative pair as half a correct ranking, what is the ROC AUC?

Area Under Curve Hard
A. Approximately
B. Approximately
C. Approximately
D. Approximately

54 A strictly increasing nonlinear transformation is applied to every classifier score. No scores were tied originally. Which statement is necessarily true?

Area Under Curve Hard
A. The transformed scores remain calibrated
B. Logarithmic loss remains unchanged
C. ROC AUC remains unchanged
D. The optimal probability threshold remains unchanged

55 A classifier has true-positive rate and false-positive rate in a population with positive prevalence . What precision should be expected?

Precision Hard
A. Approximately
B. Approximately
C. Approximately
D. Approximately

56 At one threshold, a classifier has and precision . After increasing the threshold, true positives decrease by and false positives decrease by . What is the new precision?

Precision Hard
A. Approximately
B. Approximately
C. Approximately
D. Approximately

57 For a fixed set of continuously scored observations, the positive decision threshold is lowered without changing any scores. Which statement about positive-class recall is necessarily correct?

Recall Hard
A. Recall changes only if precision increases
B. Recall cannot decrease
C. Recall remains exactly constant
D. Recall must strictly increase

58 A classifier has precision and F1 score . What must its recall be?

F1 Score Hard
A.
B.
C.
D.

59 A three-class confusion matrix has rows as actual classes and columns as predicted classes: What is the macro-averaged F1 score?

Confusion Matrix Hard
A. Approximately
B. Approximately
C. Approximately
D. Approximately

60 A test set has observations and positive prevalence . A classifier has recall and precision . Which confusion matrix counts are correct?

Confusion Matrix Hard
A.
B.
C.
D.