1. Home
  2. Explore
  3. Computer Science
  4. Classical Machine Learning Classification

Study methods

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

Classical Machine Learning Classification

  • 50Unfamiliar
  • 0Learning
  • 0Familiar
  • 0Mastered
Topic: Classification Workflow

What is the central difference between regression and classification?

50 questions

  1. 1

    What is the central difference between regression and classification?

    1. A

      Both methods assign categories, but only regression uses a trained model.

    2. B

      Both methods predict numerical values, but use different training data.

    3. C

      Regression predicts values, while classification assigns data points to categories.

    4. D

      Regression assigns categories, while classification predicts numerical values.

    Correct answer
    C

    Regression predicts values, while classification assigns data points to categories.

    Explanation

    Regression predicts a value for a new data point; classification assigns a data point to a category or class.

  2. 2

    What is the purpose of a supervised classification model?

    1. A

      It predicts numerical values for unseen observations.

    2. B

      It groups observations without using known labels.

    3. C

      It summarizes the training data without predicting outcomes.

    4. D

      It learns from labeled examples to assign classes to unseen observations.

    Correct answer
    D

    It learns from labeled examples to assign classes to unseen observations.

    Explanation

    A supervised classification model learns from labeled training data, then predicts labels for data it has not seen.

  3. 3

    Why is a dataset divided into training and testing portions?

    1. A

      Use the training data only for evaluation and the testing data only for preprocessing.

    2. B

      Use the training data to fit the model and the testing data to evaluate it.

    3. C

      Use both portions to fit the model, then evaluate it on the training data.

    4. D

      Use the testing data to fit the model and the training data to evaluate it.

    Correct answer
    B

    Use the training data to fit the model and the testing data to evaluate it.

    Explanation

    The training portion is used to fit the model, while the held-out testing portion is used to assess how it performs on data not used for fitting.

  4. 4

    What train/test split does the workshop describe as typical when sufficient data are available?

    1. A

      Use equal portions for training and testing.

    2. B

      Use about 90% for training and 10% for testing.

    3. C

      Use about 80% for training and 20% for testing.

    4. D

      Use about 20% for training and 80% for testing.

    Correct answer
    C

    Use about 80% for training and 20% for testing.

    Explanation

    The workshop uses an approximate 80/20 division: most data for training and the remainder held out for testing.

  5. 5

    After fitting and testing a classifier, why should its performance be measured with metrics?

    1. A

      They assess how predictions compare with the actual outcomes.

    2. B

      They convert categorical values into continuous measurements.

    3. C

      They determine which rows contain missing values.

    4. D

      They ensure that every feature has the same number of categories.

    Correct answer
    A

    They assess how predictions compare with the actual outcomes.

    Explanation

    Classification metrics help assess model performance by comparing predictions with actual labels.

  6. 6

    In a supervised classification task, what do “features” and “target” refer to?

    1. A

      The features are the predicted sex, and the target is a penguin's measurements.

    2. B

      The features are the model's predicted labels, and the target is the training dataset.

    3. C

      The features are the input variables, and the target is the class the model is meant to predict.

    4. D

      The features are the train/test split, and the target is the model's accuracy.

    Correct answer
    C

    The features are the input variables, and the target is the class the model is meant to predict.

    Explanation

    A classification model uses input features to predict a target class; here the target is penguin sex.

  7. 7

    Which description matches the penguin dataset used for the classification example?

    1. A

      It contains one penguin species found across three Antarctic islands.

    2. B

      It contains three penguin species found on a single Antarctic island.

    3. C

      It contains four penguin species found across four Antarctic islands.

    4. D

      It contains three penguin species found across three Antarctic islands.

    Correct answer
    D

    It contains three penguin species found across three Antarctic islands.

    Explanation

    The Palmer penguins dataset used in the workshop includes three penguin species living on three Antarctic islands.

  8. 8

    Which variables in the penguin data are identified as categorical, and how are they prepared for a model?

    1. A

      Species, island, and sex are categorical, so their categories are encoded numerically.

    2. B

      Only sex is categorical, so it is encoded as a numerical variable.

    3. C

      Species and island are numerical, while the measurements are categorical.

    4. D

      All variables are categorical, so measurements are converted into labels.

    Correct answer
    A

    Species, island, and sex are categorical, so their categories are encoded numerically.

    Explanation

    The workshop uses species, island, and sex as categorical variables and label encoding to represent their categories numerically.

  9. 9

    For the example that predicts penguin sex, which variables serve as the six features and which serves as the target?

    1. A

      The four measurements, island, and species are features; sex is the target.

    2. B

      Island, sex, and species are features; the four measurements are the target.

    3. C

      The four measurements and species are features; island and sex are targets.

    4. D

      The four measurements and sex are features; island is the target.

    Correct answer
    A

    The four measurements, island, and species are features; sex is the target.

    Explanation

    The six input features are culmen length, culmen depth, flipper length, body mass, island, and species; sex is the target.

  10. 10

    What happens to the dataset's row count when rows with missing values are dropped?

    1. A

      It begins with 333 rows and increases to 344 after cleaning.

    2. B

      It begins with 344 rows and decreases to 334 after dropping rows with missing values.

    3. C

      It begins with 334 rows and decreases to 333 after removing missing values.

    4. D

      It begins with 344 rows and decreases to 333 after removing missing values.

    Correct answer
    B

    It begins with 344 rows and decreases to 334 after dropping rows with missing values.

    Explanation

    The dataset initially has 344 rows, and dropping rows with missing values reduces it to 334 rows.

  11. 11

    Which columns are reported to contain missing values before cleaning?

    1. A

      Missing values occur in island and species, but not in measurements.

    2. B

      Missing values occur in all seven columns equally.

    3. C

      Missing values occur in the four measurements and in sex.

    4. D

      Missing values occur in species, island, and sex only.

    Correct answer
    C

    Missing values occur in the four measurements and in sex.

    Explanation

    Missing values were found in culmen length, culmen depth, flipper length, body mass, and sex.

  12. 12

    Why does the cleaned dataset go from 334 rows to 333 rows?

    1. A

      The row with a dot is filtered out after missing-value removal, leaving 333 rows.

    2. B

      The dot is treated as a missing measurement and replaces the sex target.

    3. C

      The row with a dot is kept because label encoding converts it to a valid sex category.

    4. D

      The row is removed before missing values are dropped, leaving 334 rows.

    Correct answer
    A

    The row with a dot is filtered out after missing-value removal, leaving 333 rows.

    Explanation

    After dropping missing values, the data still contain one row with a dot in the sex field; filtering it out leaves 333 rows.

  13. 13

    How does label encoding represent the penguin dataset's categorical variables?

    1. A

      It maps every category to a distinct continuous measurement.

    2. B

      It deletes categories that do not have numerical values.

    3. C

      It maps categories to numerical codes, with three-category variables using three codes and sex using two.

    4. D

      It converts numerical measurements into three categories and sex into two measurements.

    Correct answer
    C

    It maps categories to numerical codes, with three-category variables using three codes and sex using two.

    Explanation

    Label encoding maps the three species and three islands to values such as 0, 1, and 2, and the two sex categories to 0 and 1.

  14. 14

    Which species counts are reported after rows with missing values are dropped?

    1. A

      146 Adelie, 120 Gentoo, and 67 Chinstrap penguins.

    2. B

      164 Adelie, 120 Gentoo, and 68 Chinstrap penguins.

    3. C

      146 Adelie, 120 Gentoo, and 68 Chinstrap penguins.

    4. D

      146 Adelie, 123 Gentoo, and 64 Chinstrap penguins.

    Correct answer
    C

    146 Adelie, 120 Gentoo, and 68 Chinstrap penguins.

    Explanation

    The value-count summaries report 146 Adelie, 120 Gentoo, and 68 Chinstrap penguins.

  15. 15

    Which island counts are given in the workshop's value-count summary?

    1. A

      168 Biscoe, 165 Dream, and 1 Torgersen penguin.

    2. B

      164 Biscoe, 120 Dream, and 49 Torgersen penguins.

    3. C

      146 Biscoe, 120 Dream, and 68 Torgersen penguins.

    4. D

      164 Biscoe, 123 Dream, and 47 Torgersen penguins.

    Correct answer
    D

    164 Biscoe, 123 Dream, and 47 Torgersen penguins.

    Explanation

    The reported island counts are 164 for Biscoe, 123 for Dream, and 47 for Torgersen.

  16. 16

    What are the reported counts for male and female penguins after the dot entry is removed?

    1. A

      There are 168 females and 165 males.

    2. B

      There are 168 males and 168 females.

    3. C

      There are 168 males and 165 females.

    4. D

      There are 165 males and 165 females.

    Correct answer
    C

    There are 168 males and 165 females.

    Explanation

    The cleaned sex values are reported as 168 males and 165 females, for 333 rows total.

  17. 17

    What is the stated goal of applying the standard scaler to numerical features?

    1. A

      It changes every numerical feature to have a mean of 1 and a standard deviation of 0.

    2. B

      It converts every numerical feature into a category with equal counts.

    3. C

      It standardizes numerical features to have a mean of 0 and a standard deviation of 1.

    4. D

      It removes every numerical feature whose values differ in scale.

    Correct answer
    C

    It standardizes numerical features to have a mean of 0 and a standard deviation of 1.

    Explanation

    The workshop's example applies a transformation to numerical variables so their scales are centered around a mean of 0 with a standard deviation of 1.

  18. 18

    Why does the workshop scale the penguin measurements before fitting models?

    1. A

      Scaling makes the target labels continuous so models can optimize them.

    2. B

      Scaling removes the need to encode categorical features.

    3. C

      Scaling guarantees that all features follow the same distribution of categories.

    4. D

      Scaling reduces differences in numerical magnitude among features.

    Correct answer
    D

    Scaling reduces differences in numerical magnitude among features.

    Explanation

    The numerical measurements have different magnitudes—for example, body mass is in the thousands while lengths are generally in the tens or hundreds—so scaling puts them on more comparable scales.

  19. 19

    Why set a random state when creating the train/test split?

    1. A

      It forces the test portion to contain only positive examples.

    2. B

      It makes randomized results reproducible when the same seed is used.

    3. C

      It chooses the best classifier automatically.

    4. D

      It guarantees that the model will achieve the same accuracy on new data.

    Correct answer
    B

    It makes randomized results reproducible when the same seed is used.

    Explanation

    A random state fixes the random seed so that a randomized operation, such as splitting data, can produce reproducible results.

  20. 20

    What is an outlier, according to the workshop's explanation?

    1. A

      An outlier is an extreme value that may reflect an error or a meaningful case.

    2. B

      An outlier is any value that appears in the testing rather than training data.

    3. C

      An outlier is a categorical value that cannot be label encoded.

    4. D

      An outlier is any repeated value that occurs often in a dataset.

    Correct answer
    A

    An outlier is an extreme value that may reflect an error or a meaningful case.

    Explanation

    An outlier is an extreme observation that lies unusually far from the general pattern; it may be an error or may have a meaningful explanation.

  21. 21

    What quantity is meant by the interquartile range?

    1. A

      It is the difference between the maximum and minimum values.

    2. B

      It is the average of the first and third quartiles.

    3. C

      It is the difference between the third and first quartiles.

    4. D

      It is the difference between the median and the first quartile.

    Correct answer
    C

    It is the difference between the third and first quartiles.

    Explanation

    The interquartile range is the difference between the third and first quartiles, representing the spread of the middle half of the data.

  22. 22

    How are the inner fences for identifying outliers defined?

    1. A

      The inner fences are Q3−1.5 IQRQ_3 - 1.5\,\mathrm{IQR}Q3​−1.5IQR and Q1+1.5 IQRQ_1 + 1.5\,\mathrm{IQR}Q1​+1.5IQR.

    2. B

      The inner fences are Q1−1.5 IQRQ_1 - 1.5\,\mathrm{IQR}Q1​−1.5IQR and Q1+1.5 IQRQ_1 + 1.5\,\mathrm{IQR}Q1​+1.5IQR.

    3. C

      The inner fences are Q1−1.5 IQRQ_1 - 1.5\,\mathrm{IQR}Q1​−1.5IQR and Q3+1.5 IQRQ_3 + 1.5\,\mathrm{IQR}Q3​+1.5IQR.

    4. D

      The inner fences are Q1−3 IQRQ_1 - 3\,\mathrm{IQR}Q1​−3IQR and Q3+3 IQRQ_3 + 3\,\mathrm{IQR}Q3​+3IQR.

    Correct answer
    C

    The inner fences are Q1−1.5 IQRQ_1 - 1.5\,\mathrm{IQR}Q1​−1.5IQR and Q3+1.5 IQRQ_3 + 1.5\,\mathrm{IQR}Q3​+1.5IQR.

    Explanation

    The inner lower and upper fences are Q1−1.5 IQRQ_1 - 1.5\,\mathrm{IQR}Q1​−1.5IQR and Q3+1.5 IQRQ_3 + 1.5\,\mathrm{IQR}Q3​+1.5IQR, respectively.

  23. 23

    How are the outer fences described in the workshop's outlier method?

    1. A

      The outer fences are Q1−1.5 IQRQ_1 - 1.5\,\mathrm{IQR}Q1​−1.5IQR and Q3+1.5 IQRQ_3 + 1.5\,\mathrm{IQR}Q3​+1.5IQR.

    2. B

      The outer fences are Q1−3 IQRQ_1 - 3\,\mathrm{IQR}Q1​−3IQR and Q3+3 IQRQ_3 + 3\,\mathrm{IQR}Q3​+3IQR.

    3. C

      The outer fences are Q3−3 IQRQ_3 - 3\,\mathrm{IQR}Q3​−3IQR and Q1+3 IQRQ_1 + 3\,\mathrm{IQR}Q1​+3IQR.

    4. D

      The outer fences are Q1−3 IQRQ_1 - 3\,\mathrm{IQR}Q1​−3IQR and Q1+3 IQRQ_1 + 3\,\mathrm{IQR}Q1​+3IQR.

    Correct answer
    B

    The outer fences are Q1−3 IQRQ_1 - 3\,\mathrm{IQR}Q1​−3IQR and Q3+3 IQRQ_3 + 3\,\mathrm{IQR}Q3​+3IQR.

    Explanation

    The outer fences use three times the interquartile range below the first quartile and above the third quartile.

  24. 24

    What did the workshop's fence-based check find for the four penguin measurements?

    1. A

      Outliers were found in body mass but not in the length measurements.

    2. B

      Outliers were found in every measurement except body mass.

    3. C

      No outliers were found in any of the four numerical measurements checked.

    4. D

      Outliers were found only in culmen length and flipper length.

    Correct answer
    C

    No outliers were found in any of the four numerical measurements checked.

    Explanation

    The analysis reports no outliers in culmen length, culmen depth, flipper length, or body mass.

  25. 25

    How did the workshop visualize the distributions of the penguin measurements?

    1. A

      A confusion matrix was used to compare the distributions of all measurement values.

    2. B

      Histograms and kernel density estimates were used to inspect measurement distributions, including by species.

    3. C

      A ROC curve was used to display the distribution of each measurement by island.

    4. D

      A classification report was used to visualize the distribution of categorical values.

    Correct answer
    B

    Histograms and kernel density estimates were used to inspect measurement distributions, including by species.

    Explanation

    Histograms with a kernel density estimate were used to inspect distributions, and the data were also examined separately by species.

  26. 26

    Which three classifiers are fitted in the workshop example?

    1. A

      A k-nearest neighbors classifier, a decision tree classifier, and a support vector classifier.

    2. B

      A linear regressor, a random forest regressor, and a logistic regressor.

    3. C

      A naive Bayes classifier, a clustering model, and a linear regressor.

    4. D

      A decision tree, a clustering model, and a support vector regressor.

    Correct answer
    A

    A k-nearest neighbors classifier, a decision tree classifier, and a support vector classifier.

    Explanation

    The example compares three classifiers: k-nearest neighbors, a decision tree, and a support vector classifier.

  27. 27

    What value is specified for the number of neighbors in the k-nearest neighbors model?

    1. A

      The k-nearest neighbors classifier uses a linear kernel.

    2. B

      The k-nearest neighbors classifier uses three target categories.

    3. C

      The k-nearest neighbors classifier uses three neighbors.

    4. D

      The k-nearest neighbors classifier uses three decision-tree levels.

    Correct answer
    C

    The k-nearest neighbors classifier uses three neighbors.

    Explanation

    The k-nearest neighbors model is configured with three neighbors.

  28. 28

    What does setting the decision tree's maximum depth to 3 mean in this example?

    1. A

      The tree is limited to three predicted classes.

    2. B

      The tree is limited to a maximum depth of three levels.

    3. C

      The tree is limited to three training examples.

    4. D

      The tree is limited to three input features.

    Correct answer
    B

    The tree is limited to a maximum depth of three levels.

    Explanation

    The decision tree is configured with a maximum depth of 3, limiting how many levels it can grow in this setup.

  29. 29

    Which settings are specified for the support vector classifier?

    1. A

      It uses a polynomial kernel and disables probability estimates.

    2. B

      It uses a linear kernel and disables probability estimates.

    3. C

      It uses a radial kernel and enables probability estimates.

    4. D

      It uses a linear kernel and enables probability estimates.

    Correct answer
    D

    It uses a linear kernel and enables probability estimates.

    Explanation

    The support vector classifier is configured to use a linear kernel, with probability estimates enabled.

  30. 30

    How are the training and test data used when fitting and applying each classifier?

    1. A

      Each model is fitted on unscaled test features and predicts scaled training features.

    2. B

      Each model is fitted on the target labels alone, then predicts the training features.

    3. C

      Each model is fitted on scaled training features and training labels, then predicts from scaled test features.

    4. D

      Each model is fitted on the test features and test labels, then predicts training labels.

    Correct answer
    C

    Each model is fitted on scaled training features and training labels, then predicts from scaled test features.

    Explanation

    Each model is fitted using the scaled training features and the training target labels; predictions are then made using the scaled test features.

  31. 31

    Why are the sex target labels not scaled in the same way as numerical input features?

    1. A

      Both the target labels and all input features are converted into text.

    2. B

      The target labels represent categories, while the numerical input features are scaled.

    3. C

      The target labels are discarded before training, while input features become the predictions.

    4. D

      The target labels are scaled into measurements, while the input features stay categorical.

    Correct answer
    B

    The target labels represent categories, while the numerical input features are scaled.

    Explanation

    The target is the encoded sex label, so it is categorical; the workshop scales the numerical input features rather than scaling the target labels.

  32. 32

    What does the workshop recommend doing with classifier parameters?

    1. A

      Parameters should be adjusted only after the model has been deployed.

    2. B

      Parameters determine which rows contain missing values, not how a model behaves.

    3. C

      Changing parameters is unnecessary because all classifiers behave identically.

    4. D

      Model parameters can be varied to tune performance, beginning with a simple setup.

    Correct answer
    D

    Model parameters can be varied to tune performance, beginning with a simple setup.

    Explanation

    The workshop notes that classifier algorithms have parameters that can be changed to tune a model, and recommends beginning simply before trying other settings.

  33. 33

    What does a confusion matrix summarize?

    1. A

      It compares predicted classes with actual classes.

    2. B

      It transforms continuous features into binary labels.

    3. C

      It reports the number of categories in each input feature only.

    4. D

      It compares feature distributions before and after scaling.

    Correct answer
    A

    It compares predicted classes with actual classes.

    Explanation

    The confusion matrix compares predicted classes with actual classes and summarizes correct and incorrect classifications.

  34. 34

    Which outcome is a true positive?

    1. A

      An actually positive case is predicted as positive.

    2. B

      An actually negative case is predicted as positive.

    3. C

      An actually positive case is predicted as negative.

    4. D

      An actually negative case is predicted as negative.

    Correct answer
    A

    An actually positive case is predicted as positive.

    Explanation

    A true positive occurs when an actually positive case is predicted as positive.

  35. 35

    Which outcome is a false negative?

    1. A

      An actually positive case is predicted as negative.

    2. B

      An actually positive case is predicted as positive.

    3. C

      An actually negative case is predicted as positive.

    4. D

      An actually negative case is predicted as negative.

    Correct answer
    A

    An actually positive case is predicted as negative.

    Explanation

    A false negative is a positive case that the model incorrectly predicts as negative.

  36. 36

    Which outcome is a true negative?

    1. A

      An actually positive case is predicted as negative.

    2. B

      An actually negative case is predicted as negative.

    3. C

      An actually negative case is predicted as positive.

    4. D

      An actually positive case is predicted as positive.

    Correct answer
    B

    An actually negative case is predicted as negative.

    Explanation

    A true negative occurs when an actually negative case is predicted as negative.

  37. 37

    Which outcome is a false positive?

    1. A

      An actually positive case is predicted as positive.

    2. B

      An actually negative case is predicted as positive.

    3. C

      An actually negative case is predicted as negative.

    4. D

      An actually positive case is predicted as negative.

    Correct answer
    B

    An actually negative case is predicted as positive.

    Explanation

    A false positive is an actually negative case that the model incorrectly predicts as positive.

  38. 38

    How is precision for the positive class calculated?

    1. A

      TN/(TN+FP)TN/(TN+FP)TN/(TN+FP), the proportion of actual negatives that were found.

    2. B

      TP/(TP+FP)TP/(TP+FP)TP/(TP+FP), the proportion of predicted positives that were correct.

    3. C

      TP/(TP+TN)TP/(TP+TN)TP/(TP+TN), the proportion of correct predictions that were positive.

    4. D

      TP/(TP+FN)TP/(TP+FN)TP/(TP+FN), the proportion of actual positives that were found.

    Correct answer
    B

    TP/(TP+FP)TP/(TP+FP)TP/(TP+FP), the proportion of predicted positives that were correct.

    Explanation

    Precision is the proportion of predicted positive cases that are truly positive: TP/(TP+FP)TP/(TP+FP)TP/(TP+FP).

  39. 39

    How is recall for the positive class calculated?

    1. A

      TP/(TP+FP)TP/(TP+FP)TP/(TP+FP), the proportion of predicted positives that were correct.

    2. B

      TP/(TP+FN)TP/(TP+FN)TP/(TP+FN), the proportion of actual positives that were found.

    3. C

      TP/(TP+TN)TP/(TP+TN)TP/(TP+TN), the proportion of actual negatives that were found.

    4. D

      TN/(TN+FP)TN/(TN+FP)TN/(TN+FP), the proportion of predicted negatives that were correct.

    Correct answer
    B

    TP/(TP+FN)TP/(TP+FN)TP/(TP+FN), the proportion of actual positives that were found.

    Explanation

    Recall is the proportion of actual positive cases that the model correctly identifies: TP/(TP+FN)TP/(TP+FN)TP/(TP+FN).

  40. 40

    What is the role of the F1 score in a classification report?

    1. A

      It provides a single metric that combines precision and recall.

    2. B

      It counts the number of examples in each class without evaluating predictions.

    3. C

      It measures only the number of correctly predicted negative cases.

    4. D

      It measures the spread of feature values around their means.

    Correct answer
    A

    It provides a single metric that combines precision and recall.

    Explanation

    The F1 score is one of the classification measures reported alongside precision and recall; it combines those two measures into a single score.

  41. 41

    What does “support” mean in a classification report?

    1. A

      It is the number of predicted probabilities above a chosen threshold.

    2. B

      It is the number of model parameters tuned during training.

    3. C

      It is the number of features used by the classifier.

    4. D

      It is the number of actual examples in each class.

    Correct answer
    D

    It is the number of actual examples in each class.

    Explanation

    Support is the number of actual examples belonging to each class in the evaluated data.

  42. 42

    How do macro and weighted averages differ in a classification report?

    1. A

      A macro average weights classes by support, while a weighted average gives them equal weight.

    2. B

      Both averages are calculated only from the total number of correct predictions.

    3. C

      A macro average reports only the largest class, while a weighted average reports only the smallest.

    4. D

      A macro average treats classes equally, while a weighted average accounts for class support.

    Correct answer
    D

    A macro average treats classes equally, while a weighted average accounts for class support.

    Explanation

    A macro average averages the class-specific metric values without weighting them by class size; a weighted average accounts for class support.

  43. 43

    Which information does the classification report provide in the workshop?

    1. A

      It displays only the ROC curve's area and the random-state value.

    2. B

      It summarizes class-level precision, recall, F1 score, and support, along with accuracy and averages.

    3. C

      It summarizes feature means, standard deviations, and outlier fences only.

    4. D

      It reports the number of missing values without comparing predictions.

    Correct answer
    B

    It summarizes class-level precision, recall, F1 score, and support, along with accuracy and averages.

    Explanation

    The classification report displays class-level precision, recall, F1 score, and support, as well as overall accuracy and averages.

  44. 44

    Why might different research groups choose different classification metrics?

    1. A

      The same metric is always best, regardless of the application.

    2. B

      Metric choice depends only on which classifier is fastest to train.

    3. C

      A model should be selected using accuracy alone in every application.

    4. D

      The most informative metric depends on the task and the priorities of the application or field.

    Correct answer
    D

    The most informative metric depends on the task and the priorities of the application or field.

    Explanation

    Metric choice depends on the application and the kind of performance that matters; different research groups may prefer different measures.

  45. 45

    What makes the penguin-sex prediction task a binary classification problem?

    1. A

      It predicts labels without using input features.

    2. B

      It predicts a continuous measurement rather than a class.

    3. C

      It predicts between two classes, such as male and female.

    4. D

      It predicts one of three or more classes in every case.

    Correct answer
    C

    It predicts between two classes, such as male and female.

    Explanation

    A binary classifier predicts one of two classes, such as male or female in this example.

  46. 46

    What size confusion matrix would be used to classify the penguins into their three species?

    1. A

      It becomes a one-by-three matrix because only predictions are counted.

    2. B

      It becomes a three-by-two matrix because only actual classes are counted.

    3. C

      It becomes a three-by-three matrix because there are three species classes.

    4. D

      It remains a two-by-two matrix because species are categorical.

    Correct answer
    C

    It becomes a three-by-three matrix because there are three species classes.

    Explanation

    Predicting among three penguin species is a three-class problem, so its confusion matrix has three actual-class rows and three predicted-class columns.

  47. 47

    What quantities are compared on a receiver operating characteristic curve?

    1. A

      It plots the false negative rate against the number of classes.

    2. B

      It plots the true positive rate against the false positive rate.

    3. C

      It plots precision against recall for each feature.

    4. D

      It plots accuracy against the number of training examples.

    Correct answer
    B

    It plots the true positive rate against the false positive rate.

    Explanation

    An ROC curve plots the true positive rate against the false positive rate as classification thresholds vary.

  48. 48

    How does the workshop interpret ROC areas of 0.5 and 1?

    1. A

      An area of 1 represents no classification ability, while values near 0.5 represent perfection.

    2. B

      An area of 0.5 represents perfect classification, while 1 represents random classification.

    3. C

      An area of 0 represents random classification, while 0.5 represents perfect classification.

    4. D

      An area of 0.5 represents random classification, while 1 represents perfect classification.

    Correct answer
    D

    An area of 0.5 represents random classification, while 1 represents perfect classification.

    Explanation

    An area under the ROC curve of 0.5 represents random classification, while an area of 1 represents perfect classification in the workshop's explanation.

  49. 49

    Using the reported ROC areas, which classifier performs best among the three tested models?

    1. A

      Choose the decision tree because its area is 0.94, higher than the other models.

    2. B

      Choose the support vector classifier because its area of 0.93 is the highest reported.

    3. C

      Choose k-nearest neighbors because its area of 0.91 is the highest reported.

    4. D

      Choose k-nearest neighbors because its area of 0.94 is the highest reported.

    Correct answer
    D

    Choose k-nearest neighbors because its area of 0.94 is the highest reported.

    Explanation

    The reported areas are 0.94 for k-nearest neighbors, 0.93 for the decision tree, and 0.91 for the support vector classifier; the k-nearest neighbors model is highest.

  50. 50

    What is the goal of dimensionality reduction as introduced in the workshop?

    1. A

      It replaces all numerical measurements with class labels before classification.

    2. B

      It transforms a problem into a lower-dimensional representation to simplify analysis.

    3. C

      It divides observations into training and testing groups without transforming features.

    4. D

      It increases the number of input variables so that every possible measurement is included.

    Correct answer
    B

    It transforms a problem into a lower-dimensional representation to simplify analysis.

    Explanation

    Dimensionality reduction asks whether a problem with many variables can be represented in a simpler, lower-dimensional space while retaining useful information.

Question 1 of 50
Question 1 of 50

Ask anything

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

FlashcardsQuizFill in the blanksWritten testLessonNotesPodcastContent