1. Home
  2. Explore
  3. Computer Science
  4. Machine Learning Foundations

Study methods

Flashcards
Quiz
Fill in the blanks
Written test
Lesson
Notes
Podcast
Content

Machine Learning Foundations

  • 84Unfamiliar
  • 0Learning
  • 0Familiar
  • 0Mastered
Topic: ML Foundations

According to the experience-task-performance framework, when has a program learned?

84 questions

  1. 1

    According to the experience-task-performance framework, when has a program learned?

    1. A

      When a programmer adds more explicit rules for every possible input

    2. B

      When it stores experience without changing its task performance

    3. C

      When it completes a task once, regardless of how well it performs

    4. D

      When its performance on a task improves with experience, according to a performance measure

    Correct answer
    D

    When its performance on a task improves with experience, according to a performance measure

    Explanation

    A program learns when experience improves its performance on a task, as measured by a performance measure.

  2. 2

    In the robot-driving example, which pairing correctly identifies the task and experience?

    1. A

      The task is identifying human drivers; the experience is a set of hand-coded driving rules

    2. B

      The task is driving using vision sensors; the experience is recorded images and steering commands

    3. C

      The task is improving a performance measure; the experience is the highway route itself

    4. D

      The task is recording steering commands; the experience is the robot's average distance before error

    Correct answer
    B

    The task is driving using vision sensors; the experience is recorded images and steering commands

    Explanation

    Driving on highways using vision sensors is the task, while recorded images and steering commands from observing a human driver provide experience.

  3. 3

    Which description best defines machine learning as presented in the content?

    1. A

      A hardware approach that makes computers calculate fixed instructions more quickly

    2. B

      A database technique that stores large amounts of information without analyzing it

    3. C

      A programming method that requires developers to specify every decision rule in advance

    4. D

      A branch of AI that finds patterns in data and uses them to make predictions without explicit programming

    Correct answer
    D

    A branch of AI that finds patterns in data and uses them to make predictions without explicit programming

    Explanation

    Machine learning enables algorithms to uncover patterns in datasets and use them to predict outcomes for new, similar data without explicit programming for every scenario.

  4. 4

    What is the key difference between traditional programming and machine learning in the cake-identification example?

    1. A

      Traditional programming uses only images; machine learning uses only ingredient lists

    2. B

      Traditional programming produces rules as its output; machine learning produces only raw data

    3. C

      Traditional programming supplies data and rules to obtain an output; machine learning uses examples and desired outputs to infer rules

    4. D

      Traditional programming infers rules from examples; machine learning requires a programmer to write every rule

    Correct answer
    C

    Traditional programming supplies data and rules to obtain an output; machine learning uses examples and desired outputs to infer rules

    Explanation

    Traditional programming combines data with a manually specified program to produce an output. In the machine-learning example, examples and desired outputs are used to learn the underlying program or rules.

  5. 5

    Why might a hand-coded cake-identification program fail on a square vanilla cake?

    1. A

      Its rules may encode only examples such as round, chocolate cakes and fail to cover unanticipated variations

    2. B

      Its output must be a continuous number rather than a category

    3. C

      Its data will automatically become unlabeled when the cake shape changes

    4. D

      Its rules cannot process any visual information unless the cake is photographed from above

    Correct answer
    A

    Its rules may encode only examples such as round, chocolate cakes and fail to cover unanticipated variations

    Explanation

    A rule-based program can fail when it has not been given an exception for a variation, such as a square shape or vanilla flavor. Machine learning can infer broader patterns from diverse examples.

  6. 6

    How does the example spam filter learn to recognize spam?

    1. A

      It analyzes many labeled emails and learns changing text patterns associated with spam

    2. B

      It groups emails by sender without examining message content or labels

    3. C

      It blocks every email containing a word from a fixed human-written list

    4. D

      It asks each recipient to classify every incoming email before filtering

    Correct answer
    A

    It analyzes many labeled emails and learns changing text patterns associated with spam

    Explanation

    The spam filter learns from a large set of labeled emails, identifying complex text patterns rather than relying only on a fixed dictionary of forbidden words.

  7. 7

    What does adaptability mean for a recommendation system?

    1. A

      It removes historical user behavior whenever a new item is watched

    2. B

      It improves only when a programmer manually rewrites its recommendation rules

    3. C

      It can refine its suggestions as a user's viewing history and tastes change

    4. D

      It gives every user the same recommendations after its first training session

    Correct answer
    C

    It can refine its suggestions as a user's viewing history and tastes change

    Explanation

    Recommendation systems can update their suggestions based on ongoing viewing behavior, adapting when a user's tastes change.

  8. 8

    Why can machine learning be useful for processing enormous transaction datasets?

    1. A

      It avoids processing large datasets by sampling only one transaction per customer

    2. B

      It can analyze vast numbers of transactions in real time to flag suspicious activity

    3. C

      It reduces every transaction to a single fixed rule before examining it

    4. D

      It requires human reviewers to approve every transaction before detecting patterns

    Correct answer
    B

    It can analyze vast numbers of transactions in real time to flag suspicious activity

    Explanation

    Machine learning can handle very large volumes of data, such as global bank transactions, and flag suspicious activity in real time.

  9. 9

    How can machine learning automate repetitive customer-service work?

    1. A

      Chatbots can automate work only after customers label every request themselves

    2. B

      Chatbots can handle multi-step requests such as tracking orders and processing returns

    3. C

      Chatbots can respond only to single-word questions with fixed replies

    4. D

      Chatbots can replace all human judgment, including handling nuanced issues

    Correct answer
    B

    Chatbots can handle multi-step requests such as tracking orders and processing returns

    Explanation

    Chatbots can handle complex, multi-step inquiries such as order tracking and returns, freeing human agents to focus on more nuanced issues.

  10. 10

    What makes a personalized music playlist an example of machine-learning personalization?

    1. A

      The system sends a single identical playlist to every listener

    2. B

      The system selects songs only according to their release dates

    3. C

      The system analyzes an individual's behavior to tailor the listening experience

    4. D

      The system asks a human editor to create a separate playlist for every listening session

    Correct answer
    C

    The system analyzes an individual's behavior to tailor the listening experience

    Explanation

    Personalization involves analyzing an individual's behavior to provide a tailored experience, such as a customized playlist.

  11. 11

    Which statement correctly describes the relationship among AI, machine learning, and deep learning?

    1. A

      Machine learning and deep learning are broader fields that contain AI as a specialized technique

    2. B

      Deep learning is the broad field, AI is a specialized form of it, and machine learning is unrelated to either

    3. C

      AI, machine learning, and deep learning describe the same field and differ only in name

    4. D

      AI is the broad field, machine learning is one approach within it, and deep learning is a specialized form of machine learning using layered neural networks

    Correct answer
    D

    AI is the broad field, machine learning is one approach within it, and deep learning is a specialized form of machine learning using layered neural networks

    Explanation

    AI is the overarching field, machine learning is an approach within AI, and deep learning is a specialized form of machine learning that uses layered neural networks.

  12. 12

    How is data science positioned relative to machine learning in the content?

    1. A

      Data science is a type of supervised learning that uses only labeled data

    2. B

      Data science is a neural-network architecture contained entirely within deep learning

    3. C

      Data science is the opposite of machine learning because it avoids analyzing data

    4. D

      Data science is the practice of extracting knowledge from data and intersects with machine learning

    Correct answer
    D

    Data science is the practice of extracting knowledge from data and intersects with machine learning

    Explanation

    Data science is described as the broader practice of extracting knowledge from data, intersecting with machine learning in the larger technology landscape.

  13. 13

    Which comparison of the data used by the three main learning types is correct?

    1. A

      All three require the same kind of labeled, static dataset

    2. B

      Supervised and unsupervised learning both require rewards, while reinforcement learning requires labeled examples

    3. C

      Supervised learning uses labeled data, unsupervised learning uses unlabeled data, and reinforcement learning learns through interaction with an environment

    4. D

      Supervised learning uses unlabeled data, unsupervised learning uses labeled data, and reinforcement learning uses only a fixed answer key

    Correct answer
    C

    Supervised learning uses labeled data, unsupervised learning uses unlabeled data, and reinforcement learning learns through interaction with an environment

    Explanation

    Supervised learning learns from labeled examples, unsupervised learning finds structure in unlabeled data, and reinforcement learning interacts with an environment rather than relying on a predefined static dataset.

  14. 14

    Which set of algorithm associations matches the learning types described?

    1. A

      PCA and Q-learning—supervised; linear regression—reinforcement; SVMs—unsupervised

    2. B

      Linear regression and SVMs—supervised; PCA—unsupervised; Q-learning—reinforcement

    3. C

      Linear regression—unsupervised; PCA—supervised; SVMs and Q-learning—reinforcement

    4. D

      Linear regression and PCA—reinforcement; SVMs—unsupervised; Q-learning—supervised

    Correct answer
    B

    Linear regression and SVMs—supervised; PCA—unsupervised; Q-learning—reinforcement

    Explanation

    The content associates linear regression and support vector machines with supervised learning, principal component analysis with unsupervised learning, and Q-learning with reinforcement learning.

  15. 15

    How does the teacher-student analogy describe supervised learning?

    1. A

      The teacher selects actions in a live environment and rewards the algorithm for each one

    2. B

      The algorithm invents labels for its data and never checks them against answers

    3. C

      The algorithm predicts from labeled examples and is corrected by comparing its predictions with known answers

    4. D

      The algorithm is given only raw inputs and must decide when its own performance is acceptable

    Correct answer
    C

    The algorithm predicts from labeled examples and is corrected by comparing its predictions with known answers

    Explanation

    In supervised learning, known answers act like a teacher's corrections: predictions are compared with labels, and the algorithm adjusts its internal model.

  16. 16

    A clinic trains a model using patient age and gender along with known healthy-or-sick labels. What is the model learning?

    1. A

      A relationship between the patient features and the health labels that can be used to predict labels for new patients

    2. B

      A reward-maximizing sequence of actions for treating each patient

    3. C

      A method for replacing patient features with a smaller set of randomly chosen columns

    4. D

      A set of patient groups without using health labels or checking predictions

    Correct answer
    A

    A relationship between the patient features and the health labels that can be used to predict labels for new patients

    Explanation

    The labeled examples allow a supervised algorithm to learn relationships between patient features and health status, then predict a label for a new patient.

  17. 17

    What is the main goal of unsupervised learning in the unlabeled clinic example?

    1. A

      Predict a specific patient's health using a provided answer key

    2. B

      Discover patterns or groups in patient data without being told which patients are healthy or sick

    3. C

      Reproduce the clinic's existing health labels as accurately as possible

    4. D

      Choose medical actions that maximize an immediate reward

    Correct answer
    B

    Discover patterns or groups in patient data without being told which patients are healthy or sick

    Explanation

    With unlabeled data, an unsupervised algorithm seeks structure, such as previously unnoticed patient clusters, without being given health-status answers.

  18. 18

    What defines reinforcement learning in the examples provided?

    1. A

      A programmer directly specifies the best action for every possible situation

    2. B

      An agent learns which actions to take through interaction, using rewards and penalties to guide behavior

    3. C

      A learner maps labeled inputs to answers supplied for every training example

    4. D

      An algorithm groups static data points without receiving feedback from an environment

    Correct answer
    B

    An agent learns which actions to take through interaction, using rewards and penalties to guide behavior

    Explanation

    Reinforcement learning trains an agent to act in an environment by discovering which actions yield rewards and which lead to penalties.

  19. 19

    Why is a chess move that leads to checkmate many moves later an example of a delayed reward?

    1. A

      The move has no effect on later situations or outcomes

    2. B

      The move may have little immediate payoff but can contribute to a valuable future outcome

    3. C

      The move is rewarded because its action was specified in a labeled training set

    4. D

      The move receives a reward only when the game ends in a draw

    Correct answer
    B

    The move may have little immediate payoff but can contribute to a valuable future outcome

    Explanation

    An action can affect later situations and rewards. A move that seems insignificant now may help produce checkmate later, so the learner must value long-term payoff.

  20. 20

    Which applications are given as examples of reinforcement learning?

    1. A

      Training systems to play complex games and teaching bipedal robots to walk and balance

    2. B

      Finding a line of best fit for house prices and classifying emails as spam

    3. C

      Compressing image data and plotting customer clusters

    4. D

      Standardizing patient ages and imputing missing clinic records

    Correct answer
    A

    Training systems to play complex games and teaching bipedal robots to walk and balance

    Explanation

    The content cites game-playing systems such as AlphaGo and bipedal robots learning to walk and balance as reinforcement-learning applications.

  21. 21

    Which sequence best represents the general machine-learning lifecycle described?

    1. A

      Train on unseen data, deploy immediately, and prepare the training data only if errors appear

    2. B

      Collect and prepare data, select features and a model, train, evaluate and tune, then deploy for predictions

    3. C

      Deploy a model, collect its predictions, select a task, and then decide whether to train it

    4. D

      Select an output, discard the data, and use evaluation as a replacement for training

    Correct answer
    B

    Collect and prepare data, select features and a model, train, evaluate and tune, then deploy for predictions

    Explanation

    The lifecycle proceeds through data preparation, feature and model selection, training, evaluation and tuning, and finally deployment for predictions on unseen data.

  22. 22

    What is the curse of dimensionality?

    1. A

      As features increase, the mathematical space grows rapidly, making data sparse and learning slower or more difficult

    2. B

      A dataset becomes unusable whenever it includes both numbers and text

    3. C

      A model becomes less accurate whenever its training data contains labels

    4. D

      As features decrease, every dataset becomes too dense for a model to process

    Correct answer
    A

    As features increase, the mathematical space grows rapidly, making data sparse and learning slower or more difficult

    Explanation

    Adding dimensions causes the volume of the mathematical space to grow rapidly. This can make data sparse, slow training, and confuse models.

  23. 23

    What is the purpose of dimensionality reduction?

    1. A

      Increase the number of features so the model can represent every possible detail

    2. B

      Transform data into fewer dimensions while preserving its essential information and patterns

    3. C

      Convert every feature into a label before model training

    4. D

      Delete all features except the one with the largest numerical values

    Correct answer
    B

    Transform data into fewer dimensions while preserving its essential information and patterns

    Explanation

    Dimensionality reduction maps high-dimensional data into a lower-dimensional space while preserving the essence of the original information.

  24. 24

    How does a machine-learning model represent a structured dataset such as a patient table?

    1. A

      As a mathematical matrix, a structured grid of values

    2. B

      As a single value that summarizes every patient

    3. C

      As a flowchart whose branches are the individual patients

    4. D

      As a sequence of unrelated sentences with no row or column structure

    Correct answer
    A

    As a mathematical matrix, a structured grid of values

    Explanation

    A computer can represent a structured table as a matrix: an organized mathematical grid of values.

  25. 25

    In a patient dataset matrix, what does a row vector represent?

    1. A

      The average value across all patients

    2. B

      One instance, such as one patient's complete profile

    3. C

      The relationship between two different datasets

    4. D

      One feature, such as every patient's age

    Correct answer
    B

    One instance, such as one patient's complete profile

    Explanation

    A row vector represents a single instance. In the clinic example, one patient's complete profile forms a row.

  26. 26

    In the same matrix, what does a column vector represent?

    1. A

      One patient's complete profile across all features

    2. B

      A set of unrelated values selected from different features

    3. C

      One feature measured across all instances, such as the age of every patient

    4. D

      A list of the model's predictions for future patients only

    Correct answer
    C

    One feature measured across all instances, such as the age of every patient

    Explanation

    A column vector contains one feature across all instances, such as every patient's age.

  27. 27

    A patient record is missing an age value. Which preprocessing response is described in the content?

    1. A

      Treat the missing value as proof that the patient is sick

    2. B

      Remove every feature from the dataset that contains any missing value

    3. C

      Impute the missing value, for example by using the average age, rather than discarding the entire record

    4. D

      Duplicate the record until the missing age is supplied by another row

    Correct answer
    C

    Impute the missing value, for example by using the average age, rather than discarding the entire record

    Explanation

    Data cleaning can handle missing values through imputation, such as filling in a missing age with the average age, so the full record need not be discarded.

  28. 28

    Why standardize features such as bedroom count and square footage before training some models?

    1. A

      To ensure the model ignores all numerical features and uses only categories

    2. B

      To put features on comparable scales so large raw numbers do not dominate the learning process

    3. C

      To make every feature have the same value for every instance

    4. D

      To replace data cleaning with a single scaling operation

    Correct answer
    B

    To put features on comparable scales so large raw numbers do not dominate the learning process

    Explanation

    Standardization scales features to comparable ranges, preventing a feature such as square footage from dominating simply because its raw numbers are larger.

  29. 29

    Which sequence matches the three-part preprocessing pipeline described?

    1. A

      Reduce the data, train the model, then fill in missing values

    2. B

      Clean the data, transform or standardize variables, then reduce the data

    3. C

      Select the model, deploy it, then transform the original variables

    4. D

      Standardize the labels, evaluate the model, then collect the data

    Correct answer
    B

    Clean the data, transform or standardize variables, then reduce the data

    Explanation

    The described preprocessing workflow begins with data cleaning, continues with transformation such as normalization or standardization, and then applies data reduction.

  30. 30

    Which statement best distinguishes feature selection from feature extraction?

    1. A

      Selection changes labels into predictions; extraction changes predictions into labels

    2. B

      Selection keeps a subset of original features; extraction creates new features by transforming information from the originals

    3. C

      Selection and extraction both keep every original feature unchanged

    4. D

      Selection creates synthetic features; extraction keeps only a subset of the original columns

    Correct answer
    B

    Selection keeps a subset of original features; extraction creates new features by transforming information from the originals

    Explanation

    Feature selection retains some original features and discards others. Feature extraction transforms the original information into a new, often more compact feature set.

  31. 31

    How does forward selection choose features?

    1. A

      It selects all features at once according to their column order

    2. B

      It starts with no features and repeatedly adds the feature that improves the model most, stopping when additions no longer help

    3. C

      It starts with all features and repeatedly removes the feature that improves the model most

    4. D

      It starts with no features and adds them randomly until all are included

    Correct answer
    B

    It starts with no features and repeatedly adds the feature that improves the model most, stopping when additions no longer help

    Explanation

    Forward selection begins with zero variables, adds the feature that most improves performance at each step, and stops when adding more no longer helps.

  32. 32

    How does backward selection choose features?

    1. A

      It begins with the most useful feature and replaces it with synthetic features

    2. B

      It starts with all features and repeatedly removes the least useful one until further removal harms performance

    3. C

      It starts with no features and adds the least useful one at each step

    4. D

      It removes all features that have different units from the target

    Correct answer
    B

    It starts with all features and repeatedly removes the least useful one until further removal harms performance

    Explanation

    Backward selection begins with the full feature set and removes the least useful feature step by step, stopping when further removal would hurt performance.

  33. 33

    What does the first principal component represent in PCA?

    1. A

      A direction chosen to minimize all variation in the data

    2. B

      The original feature with the largest number of missing values

    3. C

      A label that separates every instance into a known category

    4. D

      A new axis that captures the greatest possible variation in the data

    Correct answer
    D

    A new axis that captures the greatest possible variation in the data

    Explanation

    PCA constructs its first principal component along the direction of greatest variance, retaining as much variation—or information—as possible.

  34. 34

    How are successive principal components oriented in the PCA description?

    1. A

      They are identical to the original columns and cannot be rotated

    2. B

      They are chosen to maximize correlation with the first component

    3. C

      They are parallel to one another and capture the same variation

    4. D

      They are orthogonal to one another, with later components capturing further variation

    Correct answer
    D

    They are orthogonal to one another, with later components capturing further variation

    Explanation

    PCA constructs new axes, with the second axis orthogonal to the first and capturing the next largest spread in the data.

  35. 35

    Why is a feature that has no variation generally unhelpful for prediction?

    1. A

      Because a constant feature does not distinguish between instances or provide useful predictive information

    2. B

      Because PCA requires every feature to have the same value

    3. C

      Because a constant feature always contains more information than a varying one

    4. D

      Because a constant feature automatically becomes a target label

    Correct answer
    A

    Because a constant feature does not distinguish between instances or provide useful predictive information

    Explanation

    If a feature has the same value for every instance, such as every patient being the same age, it cannot help distinguish cases or inform predictions.

  36. 36

    Why can PCA compress a dataset while retaining useful information?

    1. A

      It keeps components with the least variation, which guarantees no information is discarded

    2. B

      It preserves only the features with the largest raw numerical scales

    3. C

      It converts every feature into a separate label before removing the original data

    4. D

      It keeps components with the greatest variation, which can preserve much of the dataset's important structure

    Correct answer
    D

    It keeps components with the greatest variation, which can preserve much of the dataset's important structure

    Explanation

    By retaining the components that capture the most variance, PCA can reduce many dimensions to a few while preserving much of the important information.

  37. 37

    How can PCA help reduce noise?

    1. A

      PCA removes all variation, including the patterns that carry useful information

    2. B

      PCA reduces noise by requiring more original features in every model

    3. C

      PCA identifies every noisy observation and replaces it with the exact correct value

    4. D

      Random noise often has little structural variance, so it may be left out when only top components are retained

    Correct answer
    D

    Random noise often has little structural variance, so it may be left out when only top components are retained

    Explanation

    The content notes that random noise often lacks substantial structural variance, so it may be excluded when PCA retains only the top components.

  38. 38

    How can PCA address multicollinearity?

    1. A

      It can duplicate highly correlated features until their values differ

    2. B

      It can force every feature to become perfectly correlated with the target

    3. C

      It can transform highly correlated features into orthogonal, uncorrelated components

    4. D

      It can remove labels so that correlations can no longer be measured

    Correct answer
    C

    It can transform highly correlated features into orthogonal, uncorrelated components

    Explanation

    PCA transforms the original features into orthogonal components, helping address confusion caused by highly correlated features.

  39. 39

    How can PCA make a dataset with many dimensions easier to visualize?

    1. A

      It can make visualization possible only by adding more dimensions

    2. B

      It can display all original dimensions simultaneously on a standard two-dimensional graph

    3. C

      It can convert the dataset into a text description of every data point

    4. D

      It can reduce the data to a few components that can be plotted in two or three dimensions

    Correct answer
    D

    It can reduce the data to a few components that can be plotted in two or three dimensions

    Explanation

    PCA can reduce a high-dimensional dataset to two or three principal components, making it possible to plot and inspect clusters visually.

  40. 40

    Why can predictions based on principal components be difficult for a domain expert to interpret?

    1. A

      PCA removes all numerical information from the original data

    2. B

      A component is selected by a human expert and has no mathematical definition

    3. C

      A component is a mathematical combination of original features rather than an easily named original variable

    4. D

      A component always represents one directly observed category

    Correct answer
    C

    A component is a mathematical combination of original features rather than an easily named original variable

    Explanation

    Principal components combine original features mathematically, so a component-based prediction may be harder to explain in familiar terms such as age or blood pressure.

  41. 41

    What can happen if PCA is applied before standardizing features with very different scales?

    1. A

      PCA will guarantee that all components have equal predictive power

    2. B

      PCA will automatically rescale every feature and preserve its original interpretation

    3. C

      PCA will ignore numerical features and use only the class labels

    4. D

      PCA may focus on the feature with the largest raw values rather than the most meaningful patterns

    Correct answer
    D

    PCA may focus on the feature with the largest raw values rather than the most meaningful patterns

    Explanation

    PCA is sensitive to scale. Without standardization, a feature with larger raw numbers may dominate the component construction.

  42. 42

    Which limitation of PCA concerns the kinds of relationships it can represent?

    1. A

      PCA assumes the dataset has only one dimension, so it cannot reduce dimensions

    2. B

      PCA assumes features are independent, so it cannot process correlated data

    3. C

      PCA assumes all features are categorical, so it cannot process numerical data

    4. D

      PCA assumes relationships are linear, so it may not capture nonlinear structure

    Correct answer
    D

    PCA assumes relationships are linear, so it may not capture nonlinear structure

    Explanation

    The content notes that PCA assumes relationships are purely linear, which limits its ability to represent nonlinear structure.

  43. 43

    What is the risk of retaining too few principal components?

    1. A

      Important information may be lost along with the discarded components

    2. B

      The original features will become more interpretable than before

    3. C

      The model will be unable to calculate any means

    4. D

      The data will necessarily become more dimensional

    Correct answer
    A

    Important information may be lost along with the discarded components

    Explanation

    Although PCA can compress data, dropping too many components risks discarding information needed for learning.

  44. 44

    In supervised learning, what are features and labels?

    1. A

      Features are evaluation metrics, and labels are model hyperparameters

    2. B

      Features are input variables, and labels are the known target outputs paired with those inputs

    3. C

      Features are known outputs, and labels are the unknown input variables

    4. D

      Features are clusters, and labels are the distances between centroids

    Correct answer
    B

    Features are input variables, and labels are the known target outputs paired with those inputs

    Explanation

    Features are inputs such as patient age and gender, while labels are the known answers, such as whether the patient is healthy or sick.

  45. 45

    Why does testing a supervised model on unseen examples matter?

    1. A

      It helps determine whether the model learned general patterns or merely memorized its training data

    2. B

      It ensures the model has seen every possible future input during training

    3. C

      It replaces the need to evaluate the model's performance

    4. D

      It allows the model to avoid learning from labeled examples

    Correct answer
    A

    It helps determine whether the model learned general patterns or merely memorized its training data

    Explanation

    Evaluation on unseen data checks whether the model generalizes beyond its training examples rather than simply memorizing them.

  46. 46

    Which order matches the six-step supervised-learning workflow in the content?

    1. A

      Collect labeled data, preprocess, select a model, train, evaluate, then make predictions

    2. B

      Preprocess data, deploy, collect labels, predict, train, then select a model

    3. C

      Select a model, predict, collect data, evaluate, preprocess, then train

    4. D

      Train, evaluate, collect data, select labels, deploy, then preprocess

    Correct answer
    A

    Collect labeled data, preprocess, select a model, train, evaluate, then make predictions

    Explanation

    The described workflow moves from labeled-data collection through preprocessing, model selection, training, evaluation on unseen examples, and finally prediction.

  47. 47

    A model must predict a house's exact sale price. Which kind of supervised problem is this?

    1. A

      Clustering, because the correct price is not a label

    2. B

      Reinforcement learning, because a house price is a delayed reward

    3. C

      Classification, because every price belongs to a distinct category

    4. D

      Regression, because the target is a continuous numerical amount

    Correct answer
    D

    Regression, because the target is a continuous numerical amount

    Explanation

    Regression predicts a continuous numerical value, such as a house price, sales revenue, or blood pressure.

  48. 48

    A model must decide whether an email is spam or not spam. Which kind of problem is this?

    1. A

      Dimensionality reduction, because the output is a smaller dataset

    2. B

      Feature extraction, because the output is a new combination of inputs

    3. C

      Classification, because the output is one of a set of discrete categories

    4. D

      Regression, because the output must be a continuous number

    Correct answer
    C

    Classification, because the output is one of a set of discrete categories

    Explanation

    Classification assigns an instance to a discrete category, such as spam or not spam.

  49. 49

    What does linear regression do in the house-price example?

    1. A

      Fits a linear equation to estimate the relationship between house features and price

    2. B

      Predicts only whether a house is expensive or inexpensive

    3. C

      Groups houses by similarity without using sale prices

    4. D

      Finds a boundary between two house categories

    Correct answer
    A

    Fits a linear equation to estimate the relationship between house features and price

    Explanation

    Linear regression models the relationship between a dependent variable, such as price, and one or more input features by fitting a linear equation.

  50. 50

    What distinguishes simple linear regression from multiple linear regression?

    1. A

      Simple linear regression uses several outputs, while multiple linear regression uses only one input

    2. B

      Simple linear regression uses labeled data, while multiple linear regression uses unlabeled data

    3. C

      Simple linear regression predicts categories, while multiple linear regression predicts numbers

    4. D

      Simple linear regression uses one input feature, while multiple linear regression uses more than one

    Correct answer
    D

    Simple linear regression uses one input feature, while multiple linear regression uses more than one

    Explanation

    The content describes simple linear regression as using one feature and multiple linear regression as using multiple features, such as bedrooms, house age, and school district.

  51. 51

    What does logistic regression predict in the content?

    1. A

      The distance between two support vectors

    2. B

      The exact continuous value of a dependent variable only

    3. C

      The location of a cluster centroid in unlabeled data

    4. D

      The probability that an instance belongs to a category

    Correct answer
    D

    The probability that an instance belongs to a category

    Explanation

    Despite its name, logistic regression is used for classification and predicts the probability that an instance belongs to a category.

  52. 52

    Which type of classification handles three or more unordered categories?

    1. A

      Multinomial classification

    2. B

      Multiple linear regression

    3. C

      Ordinal classification

    4. D

      Binary classification

    Correct answer
    A

    Multinomial classification

    Explanation

    Multinomial classification handles three or more categories that have no inherent ranking, such as cat, dog, or bird.

  53. 53

    A survey response can be poor, good, or excellent. Which classification type fits this target?

    1. A

      Linear regression, because the categories are numerical measurements

    2. B

      Ordinal classification, because the categories have a meaningful order

    3. C

      Binary classification, because the target contains exactly two categories

    4. D

      Multinomial classification, because the categories are necessarily unordered

    Correct answer
    B

    Ordinal classification, because the categories have a meaningful order

    Explanation

    Ordinal classification handles categories that have a meaningful ranked order, such as poor, good, and excellent.

  54. 54

    How does a decision tree reach a prediction?

    1. A

      It calculates one straight line through all data points and returns its slope

    2. B

      It follows attribute tests from a root through branches until reaching a leaf with a decision

    3. C

      It maximizes the distance from every point to a single probability score

    4. D

      It repeatedly moves centroids until every feature has the same value

    Correct answer
    B

    It follows attribute tests from a root through branches until reaching a leaf with a decision

    Explanation

    A decision tree is a hierarchical, flowchart-like structure: tests begin at a root node, continue through branches and internal nodes, and end at a leaf node representing the decision.

  55. 55

    Which task types can decision trees handle according to the content?

    1. A

      Only unsupervised clustering

    2. B

      Only binary classification

    3. C

      Both classification and regression

    4. D

      Only dimensionality reduction

    Correct answer
    C

    Both classification and regression

    Explanation

    Decision trees are described as versatile algorithms that can handle both classification and regression tasks.

  56. 56

    What is the main objective of a support vector machine in the two-class example?

    1. A

      Assign each point to the class with the greatest numerical label

    2. B

      Fit a curved line through every point in both groups

    3. C

      Find a hyperplane that separates the groups while maximizing the margin

    4. D

      Find a centroid that minimizes the number of categories

    Correct answer
    C

    Find a hyperplane that separates the groups while maximizing the margin

    Explanation

    An SVM seeks a separating hyperplane positioned to maximize the margin between the two groups.

  57. 57

    What are support vectors in an SVM?

    1. A

      The centroids at the centers of unsupervised clusters

    2. B

      The data points closest to the decision boundary

    3. C

      The labels used to determine a regression line's slope

    4. D

      The training examples with the largest feature values

    Correct answer
    B

    The data points closest to the decision boundary

    Explanation

    Support vectors are the data points closest to the hyperplane, and their distance from the boundary helps define the margin.

  58. 58

    Why does maximizing the SVM margin tend to help with generalization?

    1. A

      A wider separation can reduce overfitting and support clearer predictions on unseen data

    2. B

      A wider separation guarantees every training point is classified correctly, even if the data overlap

    3. C

      A wider separation eliminates the need for test data

    4. D

      A wider separation converts classification into regression

    Correct answer
    A

    A wider separation can reduce overfitting and support clearer predictions on unseen data

    Explanation

    The content links a larger margin with reduced overfitting and better generalization to new, unseen examples.

  59. 59

    Why might a soft-margin SVM be preferred over a hard-margin SVM for messy real-world data?

    1. A

      It avoids using a decision boundary between categories

    2. B

      It requires every point to be separated perfectly, regardless of outliers

    3. C

      It turns the classification task into unsupervised learning

    4. D

      It allows some outliers or errors to cross the boundary instead of letting them distort the overall separation

    Correct answer
    D

    It allows some outliers or errors to cross the boundary instead of letting them distort the overall separation

    Explanation

    A soft margin allows some slack for outliers or minor errors, which can make the overall boundary more robust than a strict hard margin.

  60. 60

    What is the goal of k-means clustering?

    1. A

      Partition data points into a chosen number of clusters based on similarity, such as physical distance

    2. B

      Find a classification boundary that maximizes the distance to labels

    3. C

      Build a sequence of models that correct each other's errors

    4. D

      Use labeled examples to predict a continuous output

    Correct answer
    A

    Partition data points into a chosen number of clusters based on similarity, such as physical distance

    Explanation

    K-means is an unsupervised method that partitions data points into a selected number of groups based on their similarity, represented in the example by distance.

  61. 61

    What does the user choose before k-means begins its clustering process?

    1. A

      The correct category for every input

    2. B

      The number of labeled examples in each cluster

    3. C

      The final coordinates of every data point

    4. D

      The number of clusters, represented by KKK

    Correct answer
    D

    The number of clusters, represented by KKK

    Explanation

    The human selects KKK, the number of clusters the algorithm should find.

  62. 62

    What are centroids in k-means?

    1. A

      Labels attached to each point before clustering begins

    2. B

      Points representing the centers of clusters, initially placed randomly

    3. C

      Errors that the next model in a boosted sequence must correct

    4. D

      Features removed from the dataset during preprocessing

    Correct answer
    B

    Points representing the centers of clusters, initially placed randomly

    Explanation

    K-means begins with KKK randomly placed centroids, which serve as initial cluster centers.

  63. 63

    After k-means assigns each point to its nearest centroid, what happens next?

    1. A

      It removes every point that is not at the exact center

    2. B

      It replaces every cluster with a supervised label

    3. C

      It permanently fixes the first centroid positions

    4. D

      It recalculates each cluster's center and moves the centroid to that center

    Correct answer
    D

    It recalculates each cluster's center and moves the centroid to that center

    Explanation

    After assignment, k-means calculates the center of the points in each cluster and moves the centroid to that new center.

  64. 64

    When does the k-means algorithm stop repeating its assignment-and-update loop?

    1. A

      When the first data point is assigned to a cluster

    2. B

      When the centroids stop moving and data points no longer switch clusters

    3. C

      When every cluster has exactly the same number of points

    4. D

      When all distances between points become zero

    Correct answer
    B

    When the centroids stop moving and data points no longer switch clusters

    Explanation

    The loop ends when updates no longer change centroid positions or cluster assignments.

  65. 65

    What is an ensemble method?

    1. A

      A method that combines predictions from multiple models to improve accuracy and robustness

    2. B

      A method that evaluates a model using only its training accuracy

    3. C

      A method that replaces every model with one fixed hand-written rule

    4. D

      A method that reduces an unlabeled dataset to a single feature

    Correct answer
    A

    A method that combines predictions from multiple models to improve accuracy and robustness

    Explanation

    Ensemble methods combine predictions from multiple individual models to achieve better predictive accuracy and robustness than relying on one model alone.

  66. 66

    Why can combining several models be more reliable than relying on one model?

    1. A

      Their aggregated predictions can reduce errors and variance compared with a single learner

    2. B

      Every model in an ensemble is guaranteed to make exactly the same predictions

    3. C

      A group of models cannot overfit under any circumstances

    4. D

      The combination removes the need to use data for training

    Correct answer
    A

    Their aggregated predictions can reduce errors and variance compared with a single learner

    Explanation

    Aggregating multiple learners can reduce errors and variance and create a more robust predictor, much as averaging a crowd's estimates can be more reliable than one person's guess.

  67. 67

    What distinguishes boosting from ensemble methods that build models independently?

    1. A

      Boosting builds models sequentially, with later models focusing on earlier models' errors

    2. B

      Boosting builds every model at the same time without using earlier predictions

    3. C

      Boosting uses a single model and does not aggregate predictions

    4. D

      Boosting is an unsupervised clustering technique that never predicts labels

    Correct answer
    A

    Boosting builds models sequentially, with later models focusing on earlier models' errors

    Explanation

    Boosting builds a sequence of models, directing later learners to address errors made by the preceding models.

  68. 68

    How does a later model in a boosted sequence focus on earlier mistakes?

    1. A

      The algorithm gives additional weight and attention to examples that were predicted incorrectly

    2. B

      The algorithm ignores the previous model and trains only on new data

    3. C

      The algorithm changes the task from classification to clustering

    4. D

      The algorithm removes every incorrectly predicted example from the training set

    Correct answer
    A

    The algorithm gives additional weight and attention to examples that were predicted incorrectly

    Explanation

    A later boosting model focuses extra weight and attention on data points that earlier models predicted incorrectly.

  69. 69

    When might a boosting process stop adding models, according to the content?

    1. A

      When the training data is predicted correctly or when a preset maximum number of models is reached

    2. B

      Only when every possible future example has been seen

    3. C

      As soon as the first weak learner is built

    4. D

      When all models have made exactly the same error

    Correct answer
    A

    When the training data is predicted correctly or when a preset maximum number of models is reached

    Explanation

    The sequence may stop when the complete training set is correctly predicted or when it reaches a chosen maximum number of models.

  70. 70

    Why might a boosted ensemble that perfectly fits its training data still perform poorly in a new environment?

    1. A

      Boosting prevents models from learning sequentially

    2. B

      It must have used unsupervised data rather than labeled data

    3. C

      It may have overfit by focusing too closely on the training examples and their small errors

    4. D

      Perfect training accuracy guarantees that the model cannot make new errors

    Correct answer
    C

    It may have overfit by focusing too closely on the training examples and their small errors

    Explanation

    The content warns that repeated attention to every training error can lead to overfitting, so a model that memorizes training data may not generalize well.

  71. 71

    What does accuracy measure in model evaluation?

    1. A

      The distance between the SVM boundary and its closest points

    2. B

      The number of clusters chosen before training

    3. C

      The overall percentage of predictions that are correct

    4. D

      The average distance of every data point from the mean

    Correct answer
    C

    The overall percentage of predictions that are correct

    Explanation

    Accuracy is the total percentage of predictions that are correct.

  72. 72

    What does a confusion matrix help track?

    1. A

      The movement of centroids during k-means

    2. B

      The amount of variance captured by each principal component

    3. C

      The order in which features are added during forward selection

    4. D

      Counts of prediction outcomes, including false positives and false negatives

    Correct answer
    D

    Counts of prediction outcomes, including false positives and false negatives

    Explanation

    A confusion matrix organizes classification outcomes and tracks errors such as false positives and false negatives.

  73. 73

    Which metrics are derived from the confusion matrix in the content?

    1. A

      Mean, variance, and standard deviation

    2. B

      Accuracy, MAD, and PCA

    3. C

      Centroids, margins, and support vectors

    4. D

      Precision, recall, and the F1 score

    Correct answer
    D

    Precision, recall, and the F1 score

    Explanation

    The content identifies precision, recall, and the F1 score as metrics derived from the confusion matrix; the F1 score is described as their combined harmonic mean.

  74. 74

    What are ROC and AUC used for in the evaluation toolkit?

    1. A

      They provide graphical tools for assessing model performance

    2. B

      They measure how far each feature is from its mean

    3. C

      They select the number of clusters for k-means

    4. D

      They identify missing values and impute them with averages

    Correct answer
    A

    They provide graphical tools for assessing model performance

    Explanation

    The receiver operating characteristic curve and area under the curve are presented as graphical tools for evaluating a model.

  75. 75

    What does mean absolute deviation measure?

    1. A

      The percentage of a model's classifications that are correct

    2. B

      The number of features that remain after dimensionality reduction

    3. C

      The average absolute distance of observations from their mean

    4. D

      The average signed distance of predictions from a decision boundary

    Correct answer
    C

    The average absolute distance of observations from their mean

    Explanation

    Mean absolute deviation measures spread by averaging the absolute distances between observations and the dataset mean.

  76. 76

    Why does the MAD calculation use absolute values?

    1. A

      To convert every observation into a category label

    2. B

      To ensure that the mean is recalculated after every data point

    3. C

      To measure distance without allowing positive and negative deviations to cancel each other

    4. D

      To give observations below the mean a negative contribution

    Correct answer
    C

    To measure distance without allowing positive and negative deviations to cancel each other

    Explanation

    Absolute values make deviations into distances, so being above or below the mean does not change the size of the contribution or cancel another deviation.

  77. 77

    What do the terms in the mean absolute deviation formula represent?

    1. A

      XXX is a cluster, μ\muμ is a centroid, summation finds the margin, and NNN is the number of models

    2. B

      XXX is an error rate, μ\muμ is a label, summation finds the maximum, and NNN is the number of classes

    3. C

      XXX is an observation, μ\muμ is the mean, summation adds the absolute distances, and NNN is the number of observations

    4. D

      XXX is the mean, μ\muμ is the number of observations, summation counts labels, and NNN is a feature

    Correct answer
    C

    XXX is an observation, μ\muμ is the mean, summation adds the absolute distances, and NNN is the number of observations

    Explanation

    In the described formula, each observation's distance from the mean is made absolute, these distances are added, and the total is divided by the number of observations.

  78. 78

    What does a high MAD among a model's errors suggest?

    1. A

      The model has no errors on its training data

    2. B

      The predictions are necessarily all close to the mean

    3. C

      The model has correctly identified every false positive

    4. D

      The errors are widely spread rather than tightly clustered

    Correct answer
    D

    The errors are widely spread rather than tightly clustered

    Explanation

    A high MAD indicates that errors are spread out, while a low MAD indicates that they are more tightly clustered and consistent.

  79. 79

    Why should models be evaluated on testing data that was not used for training?

    1. A

      To replace preprocessing and model selection with one final measurement

    2. B

      To assess performance on unseen examples rather than relying only on how well the model fits its training data

    3. C

      To ensure that the model never encounters an unfamiliar example after deployment

    4. D

      To allow the model to change every test label before scoring itself

    Correct answer
    B

    To assess performance on unseen examples rather than relying only on how well the model fits its training data

    Explanation

    Testing on unseen data provides evidence about how the model performs beyond the examples it learned from.

  80. 80

    How does collaborative filtering generate a recommendation in the movie example?

    1. A

      It assigns each movie to a cluster without considering user behavior

    2. B

      It searches movie titles for words that match a fixed list of preferred terms

    3. C

      It recommends only the most recently released movie to every user

    4. D

      It uses shared preferences between users to recommend an item liked by a similar user

    Correct answer
    D

    It uses shared preferences between users to recommend an item liked by a similar user

    Explanation

    If two users liked the same movies and one likes another movie, collaborative filtering can recommend that movie to the other user based on their shared preference pattern.

  81. 81

    Why might a credit-card purchase in another country shortly after a local purchase be flagged?

    1. A

      Any purchase made outside the customer's home country is always confirmed as fraud

    2. B

      The transaction contains no data that a model can analyze

    3. C

      Its location and timing may differ sharply from the customer's usual pattern, making it an anomaly

    4. D

      Fraud detection systems compare only the purchase amount with the merchant's name

    Correct answer
    C

    Its location and timing may differ sharply from the customer's usual pattern, making it an anomaly

    Explanation

    Fraud detection can analyze factors such as location, time, purchase history, and merchant history; an unusual combination may be flagged as an anomaly.

  82. 82

    How can machine learning help identify early-stage tumors in medical images?

    1. A

      It ignores image data and predicts from patient age alone

    2. B

      It can diagnose tumors only when a human has already marked every affected pixel

    3. C

      It can learn pixel patterns from historical images that are associated with tumors

    4. D

      It replaces image analysis with a fixed rule based on the image filename

    Correct answer
    C

    It can learn pixel patterns from historical images that are associated with tumors

    Explanation

    Learning programs can analyze historical medical images and learn pixel variations associated with early-stage tumors, including patterns difficult for people to see.

  83. 83

    What advantage does machine learning offer when data volumes exceed human capacity?

    1. A

      It can process data at a scale and speed that supports pattern recognition and decisions across many variables

    2. B

      It guarantees that every pattern found in a large dataset is meaningful

    3. C

      It makes data collection unnecessary in fields such as physics and astronomy

    4. D

      It reduces every complex decision to a single manually readable rule

    Correct answer
    A

    It can process data at a scale and speed that supports pattern recognition and decisions across many variables

    Explanation

    Machine learning can analyze enormous volumes of information and many variables faster and at a scale that would be impractical for humans to manage manually.

  84. 84

    Why is machine learning useful in applications such as medicine, finance, entertainment, and robotics?

    1. A

      Its pattern-recognition methods can be applied to very different kinds of data and tasks

    2. B

      All four fields use identical data, labels, and prediction targets

    3. C

      It is limited to applications that produce financial predictions

    4. D

      It works only when each application has an explicit rule for every case

    Correct answer
    A

    Its pattern-recognition methods can be applied to very different kinds of data and tasks

    Explanation

    The content highlights machine learning's broad versatility across domains, including medical imaging, financial fraud detection, recommendations, and robotics.

Question 1 of 84
Question 1 of 84

Ask anything

We've read this whole study set, so questions about it get the best answers.

FlashcardsQuizFill in the blanksWritten testLessonNotesPodcastContent