A model uses message features to predict whether an email is “spam” or “not spam.” Which type of machine-learning task is it?
5 Classification Online Quiz Questions
Use this free practice quiz with 20 questions to review 5 Classification, test your knowledge, and prepare for your next test or exam.
In classification, a model learns from examples with known and uses features to predict labels for new examples.
True or false: Despite its name, logistic regression is commonly used for classification.
- A
True
- B
False
Select all scenarios that illustrate multilabel classification.
- A
An email receives exactly one label: spam or not spam.
- B
A fruit is assigned exactly one label: apple, orange, or pear.
- C
A photo is tagged with both “beach” and “sunset.”
- D
A document is tagged with both “policy” and “finance.”
Which classifier seeks a boundary that separates classes with a wide margin?
- A
A K-nearest neighbors model
- B
A support vector machine
- C
A random forest
- D
A Naive Bayes model
Which classifier predicts from the labels of nearby training examples, typically using a majority vote?
Select all statements that accurately describe the named classifiers.
- A
A decision tree makes a sequence of feature-based decisions.
- B
A support vector machine seeks a wide-margin boundary.
- C
A logistic regression model is used only for regression, not classification.
- D
A K-nearest neighbors model predicts by following a sequence of feature tests.
True or false: If a multiclass model estimates probabilities for mutually exclusive classes, those estimates sum to 1.
- A
True
- B
False
Which theorem does Naive Bayes use to estimate class probabilities?
In binary classification, a can convert the estimated probability of the positive class into a label.
Which statement correctly distinguishes a classifier’s class prediction from its probability estimates?
- A
The class prediction is the estimated probability for each possible label, while probability estimates are the selected label.
- B
The class prediction and probability estimates are two names for the same output.
- C
The class prediction is the selected label, while probability estimates give estimated probabilities for possible labels.
- D
The class prediction is always a numerical value, while probability estimates are categories.
A binary classifier estimates a spam probability of 0.82 and a not-spam probability of 0.18. Explain what these estimates do and do not establish, and distinguish them from a class prediction.
A team needs a classifier whose feature-based decision rules can be easy to inspect. Which method best fits that need?
- A
A random forest, because it combines predictions from many decision trees
- B
A decision tree, because its feature-based rules can be easy to inspect
- C
A support vector machine, because kernels can represent complex boundaries
- D
K-nearest neighbors, because it uses labels from nearby examples
An email system uses message words and sender details to predict whether each message is spam or not spam. Which kind of task is this?
- A
Classification
- B
Regression
- C
Clustering
- D
Dimensionality reduction
True or false: A K-nearest neighbors classifier predicts a new example’s label using labels from nearby training examples, often by majority vote.
- A
True
- B
False
A photo-tagging system may assign both “beach” and “sunset” to the same photo. Which classification setup does this illustrate?
- A
Multiclass classification
- B
Multilabel classification
- C
Binary classification
- D
Regression
A team wants to combine predictions from many decision trees to often improve accuracy and help control overfitting. Which classifier should they consider?
A team needs a classifier whose sequence of feature-based rules can be inspected to understand decisions such as whether a message came from an unknown sender. Which classifier best fits this need?
- A
Decision tree
- B
Support vector machine
- C
K-nearest neighbors
- D
Naive Bayes
A text classifier estimates class probabilities using Bayes’ theorem and assumes that features are conditionally independent given the class. What classifier is it?
A classification problem calls for a boundary with a wide margin, and the team may need a kernel to represent a more complex boundary. Which classifier is designed around this approach?
- A
Logistic regression
- B
Decision tree
- C
Support vector machine
- D
K-nearest neighbors
Related study packs and tools
- Flashcards
02 — Information and Representation
Learn how computers encode numbers, text, images, and sound as binary data, along with the limits and trade-offs of digital representation.
- Study guide
02 — Information and Representation
A progressive guide to how computers encode numbers, text, images, and sound as binary data, including the trade-offs and limits of digital representation.
- Quiz
2 Digital Logic
A 14-question medium-difficulty quiz on Boolean algebra, logic gates, truth tables, and combinational circuits.
- Study guide
03 — Programming Fundamentals: Python Essentials
A progressive guide to Python programming fundamentals, connecting values, expressions, control flow, functions, input, output, and an integrated grade calculator.
- Flashcards
03 — Python Programming Fundamentals
A focused set of flashcards covering Python variables, data types, expressions, control flow, functions, input, output, and common programming practices.
- Study guide
3 CPU Architecture
Learn how registers, the ALU, datapath connections, and control logic work together to fetch and execute CPU instructions.
- Study guide
05 — Data Structures: Concepts, Operations, and Trade-Offs
A structured guide to the main data structures, their operations, efficiency trade-offs, representations, and practical selection criteria.
- Quiz
06 — Algorithms and Correctness
A medium-difficulty assessment of algorithm specifications, searching, sorting, iteration, recursion, invariants, termination, and correctness proofs. Questions progress from direct application to integrated reasoning.
- Study guide
07 — Efficiency and Computational Complexity
A progressive guide to measuring algorithmic time and memory requirements, interpreting asymptotic bounds, analyzing common code patterns, and balancing performance trade-offs.
- Study guide
07 Trees and Binary Search Trees
A progressive guide to tree structure, binary-tree traversals, binary search tree operations, deletion, balancing, and the way tree height determines time and space costs.
- Flashcards
08 — Discrete Mathematics for Computer Science
A focused review of propositional logic, quantifiers, sets, relations, functions, and foundational proof methods in discrete mathematics for computer science.
- Study guide
10 — Data, Systems, and Applications
A progression through how data is organized, searched, exposed through software interfaces, and managed through abstraction layers in modern computer systems.