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 nearby labeled points
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 training passes performed
B. The number of nearest examples considered
C. The number of classes in the target
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. Sequential probability
B. Geometric probability
C. Uniform 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 are conditionally independent
C. Features always have equal values
D. Features must be measured in meters

5 What is the basic structure of a decision tree?

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

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 distance calculation
C. A probability distribution only
D. A feature measurement

7 A decision rule commonly has which form?

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

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

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

9 In an SVM, what is the margin?

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

10 What does classification accuracy measure?

Accuracy Easy
A. The size of the training dataset
B. The number of input variables
C. The proportion of correct predictions
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 quality of predicted probabilities
B. The number of training features
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 larger loss value
B. A loss with no probability inputs
C. A loss equal to the sample size
D. A smaller 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 features are selected
C. How quickly a tree is built
D. How many rows contain errors

15 What does an AUC value of usually indicate?

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

16 Precision answers which question?

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

17 Recall is also commonly called which of the following?

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

18 The F1 score combines which two measures?

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

19 What information is shown in a confusion matrix?

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

20 What is a true positive?

Confusion Matrix Easy
A. A negative case correctly predicted as negative
B. A positive case correctly predicted as positive
C. A negative case incorrectly predicted as positive
D. A positive case incorrectly 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 A
B. Classification is impossible
C. Both classes equally
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. Scale both features
B. Remove the income feature
C. Sort examples by age
D. Convert labels to distances

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. Laplace smoothing
B. Cost-complexity pruning
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. Split X
B. Both are equal
C. Split Y
D. Neither can be measured

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. Increase maximum depth
D. Duplicate training rows

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 neither condition holds, approve
C. If either condition holds, approve
D. If both conditions hold, 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. Neither without probabilities
C. Classifier N
D. Either with equal preference

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

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 A has lower loss
B. Loss depends only on threshold
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 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 negative
B. True positive
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. TP decreases while TN increases
B. Both TP and FP may increase
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. Nearest distances approach zero while farthest distances diverge
B. Cross-validation always selects
C. Nearest and farthest distances become relatively similar
D. Class boundaries become linear in the enlarged space

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

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 selects either attribute and immediately classifies perfectly
B. It requires a depth-3 tree to represent the target
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 optimal probability threshold remains unchanged
B. ROC AUC remains unchanged
C. The transformed scores remain calibrated
D. Logarithmic loss 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 cannot decrease
B. Recall remains exactly constant
C. Recall changes only if precision increases
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.