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 a fixed equation
B. Classify a point using random labels
C. Classify a point using only the oldest data
D. Classify a point using nearby labeled points

2 In -nearest neighbors, what does represent?

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

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

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

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

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

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. Rows, columns, and cells
D. Nodes, branches, and leaves

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

Divide and Conquer: Decision Trees and Rules Easy
A. A final class prediction
B. A probability distribution only
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. For each row, remove a feature
B. If a condition, then an outcome
C. When a model ends, start training
D. While a condition, repeat a dataset

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

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

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 average value of the target
D. The percentage of missing values

10 What does classification accuracy measure?

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

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 quality of predicted probabilities
B. The number of training features
C. The number of tree branches
D. The distance between data points

13 For logarithmic loss, which result is generally better?

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

14 What does the area under the ROC curve measure?

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

15 What does an AUC value of usually indicate?

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

16 Precision answers which question?

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

17 Recall is also commonly called which of the following?

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

18 The F1 score combines which two measures?

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

19 What information is shown in a confusion matrix?

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

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. Both classes equally
B. Classification is impossible
C. Class A
D. Class B

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. Sort examples by age
B. Convert labels to distances
C. Scale both features
D. Remove the income feature

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. Laplace smoothing
C. Min-max scaling
D. Majority voting

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 X
C. Both are equal
D. Split Y

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. Apply tree pruning
B. Remove stopping criteria
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 neither condition holds, approve
B. If both conditions hold, approve
C. If either condition holds, approve
D. If income alone 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. Classifier M
B. Either with equal preference
C. Classifier N
D. Neither without probabilities

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. Pruning method
B. Majority method
C. Kernel method
D. Bagging 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 ignores class imbalance
B. It excludes correct negatives
C. It measures ranking quality
D. It requires probability outputs

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. Loss depends only on threshold
B. Model A has lower loss
C. Both have equal loss
D. Model B 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 predicts 82% of examples as positive
C. It ranks a random positive above a random negative about 82% of the time
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. True negative
C. False positive
D. False 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 TN and FN may increase
B. Both TP and FP may increase
C. FP decreases while FN increases
D. TP decreases while TN increases

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. Nearest distances approach zero while farthest distances diverge
C. Class boundaries become linear in the enlarged space
D. Nearest and farthest distances become relatively similar

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 contribution disappears from the posterior
B. Its likelihood ratio is effectively counted twice
C. Its class-conditional probability becomes one-half
D. Its likelihood ratio is cancelled by normalization

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 stops at the root despite a perfect depth-2 tree
B. It requires a depth-3 tree to represent the target
C. It obtains positive gain only by duplicating the records
D. It selects either attribute and immediately classifies perfectly

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. ROC AUC remains unchanged
B. The optimal probability threshold remains unchanged
C. Logarithmic loss remains unchanged
D. The transformed scores remain calibrated

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 must strictly increase
B. Recall remains exactly constant
C. Recall cannot decrease
D. Recall changes only if precision increases

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.