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 8 MCQsSupervised Learning
ECAP792 ·
60 questions. Pick an option to check it.
What does KNN need to retain when making predictions?
Not quite. Try another option.
Answer: The stored training observations
KNN compares new observations with stored training examples when making predictions.
Question 11 of 60 · Naïve Bayes algorithm · Easy
Naïve Bayes is based on which mathematical theorem?
Not quite. Try another option.
Answer: Bayes' theorem
Naïve Bayes uses Bayes' theorem to calculate class probabilities from observed features.
Question 12 of 60 · Naïve Bayes algorithm · Easy
What simplifying assumption does Naïve Bayes make about features?
Not quite. Try another option.
Answer: Features are conditionally independent given the class
Naïve Bayes assumes that features are conditionally independent when the class is known.
Question 13 of 60 · Naïve Bayes algorithm · Easy
Which application commonly uses Naïve Bayes?
Not quite. Try another option.
Answer: Email spam classification
Naïve Bayes is commonly used for text tasks such as identifying spam emails.
Question 14 of 60 · Naïve Bayes algorithm · Easy
How does Naïve Bayes usually select a predicted class?
Not quite. Try another option.
Answer: It chooses the class with the highest posterior probability
The predicted label is usually the class with the greatest posterior probability.
Question 15 of 60 · Naïve Bayes algorithm · Easy
What is a prior probability in Naïve Bayes?
Not quite. Try another option.
Answer: The probability of a class before observing features
A prior represents the probability of a class before the model considers the observed feature values.
Question 16 of 60 · Cross-validation and metrics · Easy
What is the main purpose of cross-validation?
Not quite. Try another option.
Answer: To estimate performance on unseen data
Cross-validation evaluates how well a model is likely to generalize to new data.
Question 17 of 60 · Cross-validation and metrics · Easy
In -fold cross-validation, how many subsets is the dataset divided into?
Not quite. Try another option.
Answer: subsets
The dataset is divided into folds, and each fold is used for validation once.
Question 18 of 60 · Cross-validation and metrics · Easy
What does classification accuracy measure?
Not quite. Try another option.
Answer: The proportion of predictions that are correct
Accuracy is the number of correct predictions divided by the total number of predictions.
Question 19 of 60 · Cross-validation and metrics · Easy
What information does a confusion matrix summarize?
Not quite. Try another option.
Answer: Predicted classes compared with actual classes
A confusion matrix counts correct and incorrect predictions for each class.
Question 20 of 60 · Cross-validation and metrics · Easy
What does precision measure in binary classification?
Not quite. Try another option.
Answer: The fraction of predicted positives that are correct
Precision measures how many observations predicted as positive are truly positive.
Question 21 of 60 · Introduction to classification algorithms · Medium
A model predicts the probability that a customer will cancel a subscription. If the classification threshold is increased from to , what is the most likely effect?
Not quite. Try another option.
Answer: Fewer customers will be classified as likely to cancel
A higher threshold requires a larger predicted probability for the positive class, so fewer observations are classified as positive.
Question 22 of 60 · Introduction to classification algorithms · Medium
Which task is most appropriately treated as a multiclass classification problem?
Not quite. Try another option.
Answer: Predicting a flower's species from three species
Multiclass classification assigns each observation to one of more than two discrete classes.
Question 23 of 60 · Introduction to classification algorithms · Medium
A classifier performs very well on its training data but poorly on unseen test data. What is the most likely explanation?
Not quite. Try another option.
Answer: The model is overfitting the training data
Overfitting occurs when a model learns training-specific patterns that do not generalize well to unseen data.
Question 24 of 60 · Introduction to classification algorithms · Medium
A binary classifier outputs for an observation. Using a threshold of , which class is assigned?
Not quite. Try another option.
Answer: Class , because
The observation is assigned to class because its predicted probability meets or exceeds the selected threshold.
Question 25 of 60 · KNN (k-nearest neighbors) algorithm · Medium
A KNN classifier uses Euclidean distance on age, measured from to , and annual income, measured from to . What should be done before training?
Not quite. Try another option.
Answer: Scale both features to comparable ranges
Without scaling, annual income would dominate Euclidean distance because its numerical range is much larger.
Question 26 of 60 · KNN (k-nearest neighbors) algorithm · Medium
For a binary KNN classifier, the five nearest neighbors have labels . What class is predicted using unweighted voting?
Not quite. Try another option.
Answer: Class , because it has three votes
Unweighted KNN predicts the majority class among the nearest neighbors, and class receives three of five votes.
Question 27 of 60 · KNN (k-nearest neighbors) algorithm · Medium
What is the usual effect of increasing from to a much larger value in a KNN classifier?
Not quite. Try another option.
Answer: The boundary becomes smoother with higher bias
A larger averages predictions over more neighbors, producing a smoother boundary while generally increasing bias and reducing variance.
Question 28 of 60 · KNN (k-nearest neighbors) algorithm · Medium
A KNN model gives too much influence to distant neighbors within the selected neighborhood. Which modification best addresses this issue?
Not quite. Try another option.
Answer: Weight votes by inverse distance
Inverse-distance weighting gives closer neighbors greater influence than neighbors located farther from the query point.
Question 29 of 60 · KNN (k-nearest neighbors) algorithm · Medium
Why does KNN often perform poorly when a dataset contains many irrelevant features?
Not quite. Try another option.
Answer: Distances become less informative in high dimensions
Irrelevant dimensions can distort neighborhood relationships, making nearby and distant observations harder to distinguish.
Question 30 of 60 · Naïve Bayes algorithm · Medium
The term "naive" in Naive Bayes refers to which modeling assumption?
Not quite. Try another option.
Answer: Features are conditionally independent given the class
Naive Bayes assumes that features are conditionally independent once the class label is known.
Question 31 of 60 · Naïve Bayes algorithm · Medium
A spam filter has , , and . Before normalization, which value is proportional to ?
Not quite. Try another option.
Answer:
Bayes' rule gives an unnormalized posterior proportional to the prior multiplied by the likelihood: .
Question 32 of 60 · Naïve Bayes algorithm · Medium
In a multinomial Naive Bayes text classifier, a word appears in a test document but never appeared in training documents of one class. What prevents the class probability from becoming zero?
Not quite. Try another option.
Answer: Laplace smoothing of feature counts
Laplace smoothing adds a small count to each feature-class combination, avoiding zero likelihoods for unseen words.
Question 33 of 60 · Naïve Bayes algorithm · Medium
Which Naive Bayes variant is generally most suitable when features are continuous measurements such as height and weight?
Not quite. Try another option.
Answer: Gaussian Naive Bayes
Gaussian Naive Bayes models each continuous feature using a Gaussian distribution within each class.
Question 34 of 60 · Naïve Bayes algorithm · Medium
Two classes have identical feature likelihoods for a particular observation, but class has a larger prior probability than class . Which prediction will Naive Bayes make?
Not quite. Try another option.
Answer: Class , because its posterior is larger
With equal likelihoods, the larger prior produces the larger posterior probability, so class is selected.
Question 35 of 60 · Cross-validation and metrics · Medium
In -fold cross-validation, how many times is each observation normally used for validation?
Not quite. Try another option.
Answer: Once
Each observation belongs to one validation fold and appears in the training portion of the other four iterations.
Question 36 of 60 · Cross-validation and metrics · Medium
A medical screening classifier should avoid missing patients who actually have a condition. Which metric should receive the most attention?
Not quite. Try another option.
Answer: Recall for the positive class
Recall measures the proportion of actual positive cases correctly detected, so maximizing it reduces false negatives.
Question 37 of 60 · Cross-validation and metrics · Medium
A classifier produces true positives and false positives. What is its precision?
Not quite. Try another option.
Answer:
Precision is .
Question 38 of 60 · Cross-validation and metrics · Medium
A dataset contains negative cases and positive cases. A model predicts every case as negative. Why is its accuracy misleading?
Not quite. Try another option.
Answer: It fails to identify any positive cases
The high accuracy comes from class imbalance; the model has zero recall for the positive class.
Question 39 of 60 · Cross-validation and metrics · Medium
Why is stratified cross-validation preferred for an imbalanced classification dataset?
Not quite. Try another option.
Answer: It preserves class proportions across folds
Stratification keeps approximately the same class distribution in every fold, making evaluation more representative.
Question 40 of 60 · Cross-validation and metrics · Medium
A classifier has precision and recall . What is its score?
Not quite. Try another option.
Answer:
The score is .
Question 41 of 60 · Introduction to classification algorithms · Hard
A binary classifier outputs a calibrated posterior probability . A false positive costs 2 units, a false negative costs 8 units, and correct predictions cost 0. Which decision rule minimizes conditional expected cost?
Not quite. Try another option.
Answer: Predict 1 when
Predicting 1 costs , while predicting 0 costs . The first cost is smaller when , giving .
Question 42 of 60 · Introduction to classification algorithms · Hard
A classifier trained with positive-class prior outputs . At deployment, only the class prior changes to ; the class-conditional feature distributions remain unchanged. What is the adjusted posterior probability?
Not quite. Try another option.
Answer:
The training posterior odds are . Correcting by the prior-odds ratio gives deployment odds , corresponding to probability .
Question 43 of 60 · Introduction to classification algorithms · Hard
A classifier's real-valued score is transformed by a strictly increasing nonlinear function. No ties are introduced. Which statement is necessarily true?
Not quite. Try another option.
Answer: Its ROC curve and AUC remain unchanged
A strictly increasing transformation preserves every pairwise score ranking, so ROC points obtainable by ranking and the AUC are unchanged. Calibration and fixed numerical thresholds need not be preserved.
Question 44 of 60 · Introduction to classification algorithms · Hard
A multiclass classifier provides calibrated posteriors. A correct prediction costs 0, an incorrect prediction costs 1, and abstaining costs . Let be the largest class posterior. When is abstention strictly optimal?
Not quite. Try another option.
Answer: When
Choosing the most probable class has expected loss . Abstention is better when , which is equivalent to .
Question 45 of 60 · Introduction to classification algorithms · Hard
Three one-vs-one classifiers produce , , and for the same observation. What follows from these pairwise outcomes alone?
Not quite. Try another option.
Answer: No unique class follows without an aggregation rule
The outcomes form a Condorcet cycle: each class wins once and loses once. A tie-breaking, coupling, or other aggregation rule is required.
Question 46 of 60 · KNN (k-nearest neighbors) algorithm · Hard
A KNN model uses Euclidean distance with features age in years and annual income in dollars. Income has a far larger numeric range, although both features are equally relevant. What is the most defensible preprocessing step?
Not quite. Try another option.
Answer: Scale both features using training-fold statistics only
Feature scaling prevents income from dominating Euclidean distance solely because of its units. Estimating scaling parameters within each training fold avoids validation leakage.
Question 47 of 60 · KNN (k-nearest neighbors) algorithm · Hard
Assume every pairwise feature distance is distinct. Which quantity exactly equals the leave-one-out cross-validation error of a 1-NN classifier on a training set?
Not quite. Try another option.
Answer: The fraction whose nearest other point has a different label
After an observation is removed, its 1-NN prediction is the label of its nearest remaining point. Thus, it is misclassified exactly when that neighbor has a different label.
Question 48 of 60 · KNN (k-nearest neighbors) algorithm · Hard
A distance-weighted 3-NN classifier uses weights . The neighbors are class A at distances and , and class B at distance . Which class is predicted?
Not quite. Try another option.
Answer: Class B because its total weight is four rather than three
Class A receives weight , while class B receives . Weighted KNN therefore predicts class B despite the unweighted majority.
Question 49 of 60 · KNN (k-nearest neighbors) algorithm · Hard
Under standard regularity conditions, which asymptotic choice of supports consistency of KNN as the sample size grows?
Not quite. Try another option.
Answer: while
Increasing reduces variance, while keeps the neighborhood asymptotically local. Both conditions are needed for the usual consistency result.
Question 50 of 60 · KNN (k-nearest neighbors) algorithm · Hard
Two observations have independent irrelevant binary coordinates, each distributed as Bernoulli. For squared Euclidean distance over these coordinates, what is the coefficient of variation?
Not quite. Try another option.
Answer:
The squared distance is the number of mismatches, distributed as Binomial. Its mean is and standard deviation is , so their ratio is .
Question 51 of 60 · Naïve Bayes algorithm · Hard
In multinomial Naïve Bayes, the prior odds for classes and are . A token occurs three times and has probabilities under and under . All other token contributions cancel. What are the posterior odds?
Not quite. Try another option.
Answer: in favor of class
The likelihood ratio is . Multiplying by prior odds gives posterior odds for class .
Question 52 of 60 · Naïve Bayes algorithm · Hard
A Bernoulli Naïve Bayes model has equal class priors. For an observation, and . The probabilities are in class and in class . What is predicted?
Not quite. Try another option.
Answer: Class because its likelihood is rather than
Bernoulli Naïve Bayes includes absent features. The likelihoods are for and for .
Question 53 of 60 · Naïve Bayes algorithm · Hard
A one-feature Gaussian Naïve Bayes model has equal priors and class means of 0. Class A has variance 1, and class B has variance 4. For , what does the model predict?
Not quite. Try another option.
Answer: Class A;
At the common mean, a Gaussian density is proportional to . The standard deviations are 1 and 2, so class A's density and posterior are twice class B's.
Question 54 of 60 · Naïve Bayes algorithm · Hard
In multinomial Naïve Bayes, a class contains 20 total token occurrences over a vocabulary of size 100. A particular token is absent from that class. With additive smoothing , what probability is assigned to the token?
Not quite. Try another option.
Answer:
Additive smoothing gives . The vocabulary-wide pseudocounts increase the denominator by 100.
Question 55 of 60 · Naïve Bayes algorithm · Hard
An informative binary feature is duplicated exactly and both copies are supplied to Naïve Bayes. Which effect is most accurate?
Not quite. Try another option.
Answer: Its evidence is counted twice, potentially changing posterior calibration and the predicted class
Naïve Bayes treats the copies as conditionally independent evidence. Their duplicated likelihood contributions can produce overconfident posteriors and can alter decisions when other evidence opposes them.
Question 56 of 60 · Cross-validation and metrics · Hard
A researcher compares 50 hyperparameter settings and reports the best mean score from the same 10-fold cross-validation used for selection. Which procedure best estimates generalization performance without selection bias?
Not quite. Try another option.
Answer: Use inner folds for selection and outer folds for performance estimation
Nested cross-validation separates model selection from performance estimation. Each outer test fold remains untouched by the hyperparameter search performed in its corresponding inner loop.
Question 57 of 60 · Cross-validation and metrics · Hard
A dataset contains multiple measurements from each patient, and the goal is to predict outcomes for entirely unseen patients. Which cross-validation design is appropriate?
Not quite. Try another option.
Answer: Assign all measurements from each patient to the same fold
Group-based splitting prevents measurements from one patient appearing in both training and validation sets. Otherwise, patient-specific information can cause leakage and inflate performance.
Question 58 of 60 · Cross-validation and metrics · Hard
A classifier has sensitivity and false-positive rate in a population where prevalence is . Assuming these rates transfer to that population, what is its precision?
Not quite. Try another option.
Answer: Approximately
Precision is . Low prevalence makes false positives dominate despite high sensitivity.
Question 59 of 60 · Cross-validation and metrics · Hard
A classifier has , , , and . What is its Matthews correlation coefficient?
Not quite. Try another option.
Answer: Approximately
The MCC is .
Question 60 of 60 · Cross-validation and metrics · Hard
A decision threshold is chosen to maximize F1 using the combined out-of-fold predictions from a cross-validation run. The maximum F1 on those same predictions is then reported. What is the main problem?
Not quite. Try another option.
Answer: Threshold selection reuses evaluation data and makes the reported maximum optimistic
The out-of-fold labels influenced threshold selection, so evaluating the selected threshold on them introduces selection bias. Nested cross-validation or an independent test set is needed for unbiased evaluation.
That's unit 8
Answer a few questions and your score shows up here.
Nearly through. Did unit 8 of ECAP792 save you a night before the exam?
LPU Notes is free. A student pays for the servers.
Did unit 8 of ECAP792 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.