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

Study methods

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

Supervised Machine Learning

  • 74Unfamiliar
  • 0Learning
  • 0Familiar
  • 0Mastered
Topic: Learning Foundations

What is the defining goal of supervised learning?

74 questions

  1. 1

    What is the defining goal of supervised learning?

    1. A

      Generating new observations from an estimated probability distribution

    2. B

      Reducing the number of observations without modeling a response

    3. C

      Discovering structure in predictors when no response is available

    4. D

      Using predictors to predict or detect an association with a known response

    Correct answer
    D

    Using predictors to predict or detect an association with a known response

    Explanation

    Supervised learning uses a data set of predictors, XXX, to predict or detect an association with a response, YYY.

  2. 2

    Which situation best represents unsupervised learning?

    1. A

      Predicting blood pressure from biomarkers with measured blood pressure values

    2. B

      Estimating salary from player characteristics and known salaries

    3. C

      Predicting disease subtype from gene-expression measurements

    4. D

      Discovering signal in a data matrix when no response variable is available

    Correct answer
    D

    Discovering signal in a data matrix when no response variable is available

    Explanation

    Unsupervised learning seeks to discover signal in XXX when no response variable, YYY, is available.

  3. 3

    What type of response defines a regression problem?

    1. A

      A quantitative response such as blood pressure or tumor size

    2. B

      A response that contains only missing values

    3. C

      A categorical response such as disease subtype

    4. D

      A response that is always a binary indicator

    Correct answer
    A

    A quantitative response such as blood pressure or tumor size

    Explanation

    Regression is supervised learning used to predict a quantitative response, such as blood pressure, cholesterol level, or tumor size.

  4. 4

    What type of response defines a classification problem?

    1. A

      A response consisting only of censored survival times

    2. B

      A categorical or qualitative response such as tumor status

    3. C

      A continuous numerical response such as cholesterol level

    4. D

      A response formed by averaging all predictor variables

    Correct answer
    B

    A categorical or qualitative response such as tumor status

    Explanation

    Classification predicts a categorical or qualitative response, such as tumor versus normal tissue or disease subtype.

  5. 5

    A study uses categorical predictors to predict a numerical cholesterol level. How should the problem be categorized?

    1. A

      As unsupervised learning because the predictors are nonnumeric

    2. B

      As regression because the response is quantitative

    3. C

      As survival analysis because cholesterol is measured over time

    4. D

      As classification because the predictors are categorical

    Correct answer
    B

    As regression because the response is quantitative

    Explanation

    The type of supervised-learning problem is determined by the response, not by the data type of the predictor matrix. A quantitative response makes this regression.

  6. 6

    A study uses numerical predictors to predict whether tissue is tumorous or normal. How should the problem be categorized?

    1. A

      As classification because the response is categorical

    2. B

      As unsupervised learning because tissue status is qualitative

    3. C

      As regression because the predictors are numerical

    4. D

      As dimension reduction because the predictors are measurements

    Correct answer
    A

    As classification because the response is categorical

    Explanation

    A categorical response makes the problem classification, regardless of whether the predictors are numerical or categorical.

  7. 7

    Which response represents a distinct supervised-learning setting mentioned in the content?

    1. A

      A categorical feature with several levels

    2. B

      A principal component with high variability

    3. C

      A survival time that may be censored

    4. D

      A predictor matrix with highly correlated variables

    Correct answer
    C

    A survival time that may be censored

    Explanation

    Survival time, especially when it may be censored because participants die or leave the study, is another flavor of supervised learning.

  8. 8

    What is the central difference between regression and classification?

    1. A

      The type of response being predicted

    2. B

      Whether the model is fitted using a computer

    3. C

      The number of predictors in the data matrix

    4. D

      Whether the predictors are biological measurements

    Correct answer
    A

    The type of response being predicted

    Explanation

    Regression predicts quantitative responses, whereas classification predicts categorical responses. The predictor matrix can have either type of data in both settings.

  9. 9

    In a linear model, what does the coefficient βj\beta_jβj​ represent?

    1. A

      The coefficient multiplying the jjjth feature

    2. B

      The fitted response for the jjjth observation

    3. C

      The total number of observations in the data set

    4. D

      The error associated with the jjjth observation

    Correct answer
    A

    The coefficient multiplying the jjjth feature

    Explanation

    In the model yi=β0+β1xi1+⋯+βPxiP+ϵiy_i = \beta_0 + \beta_1x_{i1} + \cdots + \beta_Px_{iP} + \epsilon_iyi​=β0​+β1​xi1​+⋯+βP​xiP​+ϵi​, βj\beta_jβj​ multiplies the jjjth feature.

  10. 10

    What is the role of the term ϵi\epsilon_iϵi​ in a linear model?

    1. A

      It represents noise associated with observation iii

    2. B

      It represents the first predictor for observation iii

    3. C

      It represents the intercept of the fitted model

    4. D

      It represents the average response across all observations

    Correct answer
    A

    It represents noise associated with observation iii

    Explanation

    The term ϵi\epsilon_iϵi​ is the noise term associated with the iiith observation.

  11. 11

    What does a hat on a coefficient, such as β^j\hat{\beta}_jβ^​j​, indicate?

    1. A

      That the coefficient is known to equal zero

    2. B

      That the coefficient is the true population parameter

    3. C

      That the coefficient is a categorical variable

    4. D

      That the coefficient is an estimate obtained by fitting the model

    Correct answer
    D

    That the coefficient is an estimate obtained by fitting the model

    Explanation

    A hat indicates an estimated quantity, such as a coefficient estimate obtained from the data.

  12. 12

    What objective does least squares use to fit a linear model?

    1. A

      It minimizes the sum of squared differences between observed and fitted responses

    2. B

      It minimizes the number of observations used for training

    3. C

      It maximizes the number of predictors included in the model

    4. D

      It forces every coefficient estimate to equal exactly zero

    Correct answer
    A

    It minimizes the sum of squared differences between observed and fitted responses

    Explanation

    Least squares chooses coefficient estimates to minimize the residual sum of squares, ∑i(yi−y^i)2\sum_i(y_i - \hat{y}_i)^2∑i​(yi​−y^​i​)2.

  13. 13

    Which expression is the residual sum of squares for fitted responses y^i\hat{y}_iy^​i​?

    1. A

      ∑i∣yi−y^i∣\sum_i |y_i - \hat{y}_i|∑i​∣yi​−y^​i​∣

    2. B

      ∑i(yi−y^i)2\sum_i (y_i - \hat{y}_i)^2∑i​(yi​−y^​i​)2

    3. C

      ∑i(yi+y^i)2\sum_i (y_i + \hat{y}_i)^2∑i​(yi​+y^​i​)2

    4. D

      1n∑iyiy^i\frac{1}{n}\sum_i y_i\hat{y}_in1​∑i​yi​y^​i​

    Correct answer
    B

    ∑i(yi−y^i)2\sum_i (y_i - \hat{y}_i)^2∑i​(yi​−y^​i​)2

    Explanation

    The residual sum of squares is the sum of squared residuals, ∑i(yi−y^i)2\sum_i (y_i - \hat{y}_i)^2∑i​(yi​−y^​i​)2.

  14. 14

    Why is a least squares fit with two predictors represented as a plane?

    1. A

      Because every data set with two predictors must be perfectly fitted

    2. B

      Because least squares can only be used with exactly two predictors

    3. C

      Because the fitted response is a linear function of two features

    4. D

      Because the response is necessarily a two-dimensional vector

    Correct answer
    C

    Because the fitted response is a linear function of two features

    Explanation

    With two predictors, a linear model defines a plane in the three-dimensional space formed by the two predictors and the response.

  15. 15

    What do the vertical distances from observations to a fitted least squares plane represent?

    1. A

      The number of variables in the model

    2. B

      The coefficient estimates β^j\hat{\beta}_jβ^​j​

    3. C

      The residuals yi−y^iy_i - \hat{y}_iyi​−y^​i​

    4. D

      The predictor values xijx_{ij}xij​

    Correct answer
    C

    The residuals yi−y^iy_i - \hat{y}_iyi​−y^​i​

    Explanation

    The vertical distance between an observed response and its fitted value is the residual, yi−y^iy_i - \hat{y}_iyi​−y^​i​.

  16. 16

    When does ordinary least squares tend to work especially well according to the content?

    1. A

      When the sample size is large and the number of predictors is small

    2. B

      When only two observations are available for many predictors

    3. C

      When the number of predictors greatly exceeds the sample size

    4. D

      When the model is deliberately made more complex than the data

    Correct answer
    A

    When the sample size is large and the number of predictors is small

    Explanation

    Least squares works particularly well in the traditional setting where nnn is large and PPP is small.

  17. 17

    What is a training set?

    1. A

      A collection of coefficient estimates from repeated experiments

    2. B

      The data used to fit the model

    3. C

      A separate data set used only for final validation

    4. D

      A set containing predictors but no responses

    Correct answer
    B

    The data used to fit the model

    Explanation

    The training set is the data used to estimate the model parameters and fit the model.

  18. 18

    How is training mean squared error related to residual sum of squares?

    1. A

      It is the residual sum of squares divided by nnn

    2. B

      It is the residual sum of squares multiplied by nnn

    3. C

      It is the square root of the residual sum of squares

    4. D

      It is the residual sum of squares plus the number of predictors

    Correct answer
    A

    It is the residual sum of squares divided by nnn

    Explanation

    Training mean squared error is 1n∑i(yi−y^i)2\frac{1}{n}\sum_i(y_i-\hat{y}_i)^2n1​∑i​(yi​−y^​i​)2, which is the residual sum of squares divided by nnn.

  19. 19

    Why is training error not a reliable measure of performance on new observations?

    1. A

      It is always calculated using a categorical response

    2. B

      It can only be calculated when the model has no predictors

    3. C

      It ignores the fitted values produced by the model

    4. D

      It measures fit to data used for fitting rather than to unseen data

    Correct answer
    D

    It measures fit to data used for fitting rather than to unseen data

    Explanation

    Training error evaluates the model on observations already used to fit it, so it does not directly measure performance on new observations.

  20. 20

    What happens to training error when variables are added to a least squares model?

    1. A

      It is guaranteed to increase with every added variable

    2. B

      It becomes impossible to calculate after one variable is added

    3. C

      It remains exactly constant regardless of the variables

    4. D

      It is guaranteed to decrease or remain unchanged

    Correct answer
    D

    It is guaranteed to decrease or remain unchanged

    Explanation

    Adding variables gives least squares more flexibility, so the training error cannot increase; it decreases or stays the same.

  21. 21

    What happens to R2R^2R2 when additional variables are added to a least squares model?

    1. A

      It is forced to equal zero for complex models

    2. B

      It is guaranteed to increase or remain unchanged

    3. C

      It is guaranteed to decrease with every added variable

    4. D

      It becomes unrelated to the training error

    Correct answer
    B

    It is guaranteed to increase or remain unchanged

    Explanation

    For a least squares model, R2R^2R2 increases or remains unchanged as predictors are added, just as training error decreases or remains unchanged.

  22. 22

    What is the main purpose of evaluating test error?

    1. A

      To guarantee that every coefficient is statistically significant

    2. B

      To maximize the number of predictors in the final model

    3. C

      To estimate how well the model predicts responses for unseen observations

    4. D

      To determine whether the training observations were measured correctly

    Correct answer
    C

    To estimate how well the model predicts responses for unseen observations

    Explanation

    Test error measures predictive performance on observations not used to fit the model, which is the relevant goal in supervised machine learning.

  23. 23

    What pattern typically describes test error as model complexity increases?

    1. A

      It decreases continuously regardless of model complexity

    2. B

      It decreases initially, reaches a minimum, and then increases

    3. C

      It remains identical to training error at every complexity level

    4. D

      It increases continuously from the simplest to the most complex model

    Correct answer
    B

    It decreases initially, reaches a minimum, and then increases

    Explanation

    Test error often follows a U-shaped pattern: it decreases at first, reaches its minimum at an intermediate complexity, and then rises because of overfitting.

  24. 24

    Why can a model with zero training error still have poor predictive performance?

    1. A

      It may have overfit the training observations and generalize poorly

    2. B

      Zero training error proves that the model has excessive bias

    3. C

      Zero training error means that the test set was used incorrectly

    4. D

      A perfect training fit guarantees a perfect test fit only for nonlinear models

    Correct answer
    A

    It may have overfit the training observations and generalize poorly

    Explanation

    A highly flexible model can fit the training data perfectly while capturing noise rather than general patterns, resulting in high test error.

  25. 25

    Why can fitting a linear model to only two observations be misleading?

    1. A

      It necessarily produces a large training error because linear models need many predictors

    2. B

      It guarantees that the estimated slope has low variance

    3. C

      It prevents the calculation of fitted values for the observed responses

    4. D

      It can produce a perfect training fit that does not generalize to new observations

    Correct answer
    D

    It can produce a perfect training fit that does not generalize to new observations

    Explanation

    With only two observations, a line can fit the training data perfectly, but the fitted relationship may be unstable and have very high test error.

  26. 26

    Which statement best describes model complexity?

    1. A

      It is determined solely by the sample size

    2. B

      It refers only to whether predictors are numerical or categorical

    3. C

      It is exactly equal to the number of predictors for every modeling method

    4. D

      It is a general measure of model flexibility, not merely the number of predictors

    Correct answer
    D

    It is a general measure of model flexibility, not merely the number of predictors

    Explanation

    Model complexity is broader than predictor count. Regularization strength, tree size, and other factors can affect flexibility even when all predictors remain included.

  27. 27

    What happens to bias as model complexity increases?

    1. A

      Bias remains exactly constant

    2. B

      Bias generally decreases

    3. C

      Bias becomes undefined whenever predictors are correlated

    4. D

      Bias generally increases

    Correct answer
    B

    Bias generally decreases

    Explanation

    More complex models generally fit the underlying patterns more flexibly, reducing bias.

  28. 28

    What does variance refer to in the bias-variance discussion?

    1. A

      The total number of response values in the training set

    2. B

      The average difference between the true coefficients and estimated coefficients

    3. C

      How much coefficient estimates vary across repeated experiments

    4. D

      The proportion of predictors with categorical measurements

    Correct answer
    C

    How much coefficient estimates vary across repeated experiments

    Explanation

    Variance describes how much estimates such as β^\hat{\beta}β^​ differ across repeated samples or experiments.

  29. 29

    According to the content, how is test error related to bias and variance?

    1. A

      It is determined only by the number of predictors

    2. B

      It is associated with squared bias plus variance

    3. C

      It is determined only by the training error

    4. D

      It is associated with bias minus variance

    Correct answer
    B

    It is associated with squared bias plus variance

    Explanation

    The content describes the test error as the sum of squared bias and variance, emphasizing the tradeoff between them.

  30. 30

    What is the typical bias-variance pattern for a very simple model?

    1. A

      Low bias and high variance

    2. B

      Zero bias and zero variance in every case

    3. C

      High bias and low variance

    4. D

      High bias and high variance in every case

    Correct answer
    C

    High bias and low variance

    Explanation

    A very simple model is stable but may be too inflexible, producing high bias and relatively low variance.

  31. 31

    What is the typical bias-variance pattern for an extremely complex model?

    1. A

      Zero bias and zero variance

    2. B

      High bias with variance that cannot be measured

    3. C

      High bias and low variance

    4. D

      Low bias and high variance

    Correct answer
    D

    Low bias and high variance

    Explanation

    A highly complex model can closely fit patterns in the data, reducing bias, but its estimates may vary substantially across samples, increasing variance.

  32. 32

    What is the purpose of the validation-set approach?

    1. A

      To train on one subset and estimate error on a separate subset

    2. B

      To remove all predictors before fitting the model

    3. C

      To replace the response with a principal component

    4. D

      To train and evaluate the model on every observation simultaneously

    Correct answer
    A

    To train on one subset and estimate error on a separate subset

    Explanation

    The validation-set approach splits the observations into two groups, fits the model on one, and evaluates its error on the other.

  33. 33

    What is a limitation of the validation-set approach?

    1. A

      It requires fitting one model for every individual observation

    2. B

      It always produces a higher error than training evaluation

    3. C

      The estimated error can depend on the arbitrary data split

    4. D

      It cannot estimate error for quantitative responses

    Correct answer
    C

    The estimated error can depend on the arbitrary data split

    Explanation

    Because the data are split arbitrarily, a different split may produce a different estimate of test error.

  34. 34

    How does leave-one-out cross-validation evaluate a model?

    1. A

      It leaves out each observation once, fits on the rest, and averages the resulting errors

    2. B

      It leaves out half the observations once and uses the remaining half for all evaluations

    3. C

      It randomly removes predictors rather than observations

    4. D

      It fits one model on all observations without evaluating prediction error

    Correct answer
    A

    It leaves out each observation once, fits on the rest, and averages the resulting errors

    Explanation

    Leave-one-out cross-validation fits nnn models, each time leaving out one observation and evaluating the prediction for that observation, then averages the errors.

  35. 35

    Why can leave-one-out cross-validation be computationally undesirable?

    1. A

      It requires fitting nnn separate models

    2. B

      It requires discarding all but one observation

    3. C

      It cannot be used with linear models

    4. D

      It estimates only training error

    Correct answer
    A

    It requires fitting nnn separate models

    Explanation

    Leave-one-out cross-validation requires a separate model fit for every observation, which can be expensive when nnn is large.

  36. 36

    What happens in five-fold cross-validation?

    1. A

      Five predictors are selected and all others are discarded

    2. B

      Five observations are removed permanently before fitting one model

    3. C

      The data are split into five sets, and all five are used only for training

    4. D

      The data are split into five sets, with each set serving once as the evaluation set

    Correct answer
    D

    The data are split into five sets, with each set serving once as the evaluation set

    Explanation

    In five-fold cross-validation, the model is trained on four folds and evaluated on the fifth, repeating this so every fold serves as the evaluation set.

  37. 37

    Why is cross-validation useful when selecting model complexity?

    1. A

      It makes training error and test error identical

    2. B

      It eliminates the need for independent observations

    3. C

      It guarantees that the most complex model will be selected

    4. D

      It provides an estimate of test error for comparing candidate models

    Correct answer
    D

    It provides an estimate of test error for comparing candidate models

    Explanation

    Cross-validation estimates out-of-sample error, allowing different complexity levels or tuning parameters to be compared.

  38. 38

    Why can least squares overfit biomedical big-data problems?

    1. A

      The number of features may be very large relative to the number of observations

    2. B

      Least squares cannot use gene-expression measurements as predictors

    3. C

      Biomedical data never contain enough predictors to fit a model

    4. D

      The response is always categorical in biomedical studies

    Correct answer
    A

    The number of features may be very large relative to the number of observations

    Explanation

    When there are many features, such as thousands of genes or proteins, relative to the sample size, least squares can fit noise and produce high test error.

  39. 39

    What is overfitting?

    1. A

      Obtaining low training error but high test error

    2. B

      Using a model with no predictors and no fitted values

    3. C

      Obtaining high training error and high test error

    4. D

      Using a model whose training and test errors are both minimal

    Correct answer
    A

    Obtaining low training error but high test error

    Explanation

    Overfitting occurs when a model fits the training data very well but performs poorly on unseen data.

  40. 40

    What is the main purpose of ridge regression and the lasso?

    1. A

      To fit linear models with reduced complexity by shrinking coefficients

    2. B

      To guarantee zero training error for every data set

    3. C

      To increase model complexity by adding every possible interaction

    4. D

      To remove the response variable before estimating coefficients

    Correct answer
    A

    To fit linear models with reduced complexity by shrinking coefficients

    Explanation

    Ridge regression and the lasso are regularization methods that penalize coefficient size and thereby reduce effective model complexity.

  41. 41

    What does the tuning parameter λ\lambdaλ control in ridge regression?

    1. A

      The categorical levels of the response

    2. B

      The number of observations in the training set

    3. C

      The strength of the penalty on the squared coefficients

    4. D

      The number of folds used in cross-validation

    Correct answer
    C

    The strength of the penalty on the squared coefficients

    Explanation

    Ridge regression minimizes the residual sum of squares plus λ∑jβj2\lambda\sum_j\beta_j^2λ∑j​βj2​. Thus, λ\lambdaλ controls the strength of coefficient shrinkage.

  42. 42

    What does ridge regression become when λ=0\lambda = 0λ=0?

    1. A

      Ordinary least squares

    2. B

      A model containing no predictors

    3. C

      A classification tree

    4. D

      Principal components regression with one component

    Correct answer
    A

    Ordinary least squares

    Explanation

    When λ=0\lambda=0λ=0, the penalty disappears, leaving the ordinary least squares objective.

  43. 43

    What happens to ridge-regression coefficients as λ\lambdaλ becomes very large?

    1. A

      They become exactly zero for every predictor

    2. B

      They become larger without bound

    3. C

      They approach zero but generally are not exactly zero

    4. D

      They remain identical to the least squares estimates

    Correct answer
    C

    They approach zero but generally are not exactly zero

    Explanation

    A large ridge penalty shrinks coefficients toward zero, but ridge regression generally does not make them exactly zero.

  44. 44

    Which statement correctly contrasts ridge regression and the lasso?

    1. A

      Ridge uses squared coefficients, whereas the lasso uses absolute coefficient values

    2. B

      Both methods use identical penalties and always produce identical models

    3. C

      Ridge uses absolute coefficients, whereas the lasso uses squared coefficient values

    4. D

      Ridge has a tuning parameter, whereas the lasso has no tuning parameter

    Correct answer
    A

    Ridge uses squared coefficients, whereas the lasso uses absolute coefficient values

    Explanation

    Ridge uses a penalty such as λ∑jβj2\lambda\sum_j\beta_j^2λ∑j​βj2​, while the lasso uses λ∑j∣βj∣\lambda\sum_j|\beta_j|λ∑j​∣βj​∣.

  45. 45

    Why is the lasso useful when a final model should use only a subset of features?

    1. A

      It can set some coefficient estimates exactly equal to zero

    2. B

      It removes the response from the optimization objective

    3. C

      It increases every coefficient until only one feature remains

    4. D

      It guarantees that every feature remains in the final model

    Correct answer
    A

    It can set some coefficient estimates exactly equal to zero

    Explanation

    The lasso can produce exactly zero coefficients, yielding a sparse model and performing feature selection.

  46. 46

    What is meant by saying that the lasso produces a sparse model?

    1. A

      All of its coefficients have the same nonzero value

    2. B

      Many of its coefficient estimates are exactly zero

    3. C

      Its predictors are transformed into principal components

    4. D

      It uses fewer observations than the training set contains

    Correct answer
    B

    Many of its coefficient estimates are exactly zero

    Explanation

    A sparse model has many zero coefficients, so only a subset of the available features contributes to the prediction.

  47. 47

    How should λ\lambdaλ typically be selected for ridge regression or the lasso?

    1. A

      Choose the value producing the largest training error

    2. B

      Choose the value producing the smallest estimated test error

    3. C

      Choose zero whenever the number of predictors is large

    4. D

      Choose the largest value regardless of predictive performance

    Correct answer
    B

    Choose the value producing the smallest estimated test error

    Explanation

    The tuning parameter is generally selected using validation or cross-validation to minimize estimated test error.

  48. 48

    After selecting λ\lambdaλ using a validation subset, what should be done before obtaining the final ridge or lasso model?

    1. A

      Set λ\lambdaλ back to zero before fitting the final model

    2. B

      Discard the validation observations permanently

    3. C

      Fit the final model using only the observations that were held out

    4. D

      Refit the model on all observations using the selected λ\lambdaλ

    Correct answer
    D

    Refit the model on all observations using the selected λ\lambdaλ

    Explanation

    After selecting λ\lambdaλ, the model should be refit on the full data set using that same tuning-parameter value.

  49. 49

    Which statement about feature inclusion is true for ridge regression?

    1. A

      It always sets all but one predictor coefficient exactly to zero

    2. B

      It generally retains all predictors, even when it strongly shrinks their coefficients

    3. C

      It includes only predictors selected by principal components

    4. D

      It removes every predictor whose coefficient is smaller than the intercept

    Correct answer
    B

    It generally retains all predictors, even when it strongly shrinks their coefficients

    Explanation

    Ridge regression shrinks coefficients but generally retains all PPP variables in the final model.

  50. 50

    What is the main idea of principal components regression?

    1. A

      Fit least squares using selected principal components instead of the original predictors

    2. B

      Fit ordinary least squares without estimating an intercept

    3. C

      Set all correlated predictors to zero before fitting least squares

    4. D

      Fit a decision tree using the original response as a predictor

    Correct answer
    A

    Fit least squares using selected principal components instead of the original predictors

    Explanation

    Principal components regression first creates principal components, then fits least squares using a selected number of those components as predictors.

  51. 51

    What are principal components?

    1. A

      Individual observations with the smallest response values

    2. B

      Regression coefficients forced to be exactly zero

    3. C

      Linear combinations of variables that capture large amounts of data variability

    4. D

      Random subsets of predictors selected without regard to variability

    Correct answer
    C

    Linear combinations of variables that capture large amounts of data variability

    Explanation

    Principal components are linear combinations of the original variables designed to capture as much variability in the predictors as possible.

  52. 52

    Why can dimension reduction be useful with many predictors?

    1. A

      Some dimensions may be redundant or uninformative

    2. B

      Every dimension is guaranteed to contain unique predictive information

    3. C

      It converts every categorical response into a quantitative one

    4. D

      Reducing dimensions always lowers training error to zero

    Correct answer
    A

    Some dimensions may be redundant or uninformative

    Explanation

    Highly correlated predictors can create redundant dimensions, and noise features can contribute uninformative dimensions.

  53. 53

    What happens in principal components regression when the number of selected components equals the number of original predictors?

    1. A

      All original predictors are removed from the model

    2. B

      The method becomes identical to the lasso with maximum penalty

    3. C

      The model becomes a decision tree

    4. D

      The method is effectively back at least squares

    Correct answer
    D

    The method is effectively back at least squares

    Explanation

    When m=Pm=Pm=P, all principal-component dimensions are used, so principal components regression is equivalent to least squares in the original predictor space.

  54. 54

    Does principal components regression perform feature selection in the original predictor space?

    1. A

      No, all original predictors generally contribute to the selected components

    2. B

      No, because it does not use any predictors in the final model

    3. C

      Yes, it always sets unselected original predictors exactly to zero

    4. D

      Yes, it retains only the predictor with the greatest variance

    Correct answer
    A

    No, all original predictors generally contribute to the selected components

    Explanation

    Principal components are combinations of the original predictors, so all original predictors can remain involved even when only a subset of components is used.

  55. 55

    Why might principal components regression fail to predict the response well?

    1. A

      Principal components cannot be calculated when predictors are correlated

    2. B

      The method always uses more parameters than least squares

    3. C

      The response is necessarily discarded during component construction

    4. D

      The components explaining predictor variability may not be predictive of the response

    Correct answer
    D

    The components explaining predictor variability may not be predictive of the response

    Explanation

    Principal components maximize variability in the predictors, not necessarily association with the response. High-variance components may therefore be weak predictors.

  56. 56

    How can a more complex linear model be created when least squares is too simple?

    1. A

      By reducing the number of observations used for training

    2. B

      By removing all nonlinear terms from the predictors

    3. C

      By adding transformations, powers, or products of the original features

    4. D

      By replacing the response with the training error

    Correct answer
    C

    By adding transformations, powers, or products of the original features

    Explanation

    A linear model can include transformed features such as xj2x_j^2xj2​, xj3x_j^3xj3​, exponentials, or products such as xjxkx_jx_kxj​xk​, and then be fitted using least squares or regularization.

  57. 57

    What is the basic strategy of a decision tree for regression?

    1. A

      Replace all predictors with one principal component

    2. B

      Fit one global plane that must pass through every observation

    3. C

      Assign every observation the same prediction regardless of its predictors

    4. D

      Partition predictor space into regions and make a prediction within each region

    Correct answer
    D

    Partition predictor space into regions and make a prediction within each region

    Explanation

    A regression tree divides the predictor space into boxes or regions and assigns a prediction to each region.

  58. 58

    How is the prediction for a region in a regression tree usually obtained?

    1. A

      By taking the largest predictor value in that region

    2. B

      By using the coefficient of the first principal component

    3. C

      By taking the average response of observations in that region

    4. D

      By setting the prediction equal to the global maximum response

    Correct answer
    C

    By taking the average response of observations in that region

    Explanation

    For regression trees, the prediction within each region is the average of the observed responses belonging to that region.

  59. 59

    What is a major advantage of decision trees?

    1. A

      They eliminate the need to evaluate test error

    2. B

      They provide highly interpretable rules for making predictions

    3. C

      They always achieve lower test error than regularized linear models

    4. D

      They require every predictor to have a linear relationship with the response

    Correct answer
    B

    They provide highly interpretable rules for making predictions

    Explanation

    Decision trees can be read as a sequence of simple splits and are therefore easy to explain and apply.

  60. 60

    What is a typical disadvantage of regression trees compared with other supervised-learning methods?

    1. A

      They cannot make predictions for quantitative responses

    2. B

      They always have higher bias and lower variance than every other method

    3. C

      They require all predictors to be principal components

    4. D

      They are often less accurate even though they are more interpretable

    Correct answer
    D

    They are often less accurate even though they are more interpretable

    Explanation

    Regression trees are attractive for interpretability, but they are typically less accurate than alternative supervised-learning approaches.

  61. 61

    What is the usual bias-variance pattern for a large decision tree?

    1. A

      Low bias and high variance

    2. B

      High bias and low variance

    3. C

      High bias and high variance by definition

    4. D

      Zero bias and zero variance

    Correct answer
    A

    Low bias and high variance

    Explanation

    A large tree is flexible and can overfit, giving low bias but high variance.

  62. 62

    What is the usual bias-variance pattern for a small decision tree?

    1. A

      High variance caused only by categorical predictors

    2. B

      Zero variance and zero bias

    3. C

      Low variance and potentially high bias

    4. D

      High variance and necessarily zero bias

    Correct answer
    C

    Low variance and potentially high bias

    Explanation

    A small tree is less flexible, so it tends to have low variance but may underfit and therefore have high bias.

  63. 63

    How should tree size generally be selected?

    1. A

      By always choosing the smallest possible tree

    2. B

      By always choosing the largest possible tree

    3. C

      By selecting the tree with the smallest training error only

    4. D

      By estimating test error for candidate tree sizes

    Correct answer
    D

    By estimating test error for candidate tree sizes

    Explanation

    Tree size should be chosen using estimated test error because large trees can overfit and small trees can underfit.

  64. 64

    What are batch effects?

    1. A

      Random error introduced only by using principal components

    2. B

      Changes in model complexity caused by adding predictors

    3. C

      Variability caused by nonbiological factors in data collection

    4. D

      Biological variation caused by the response variable itself

    Correct answer
    C

    Variability caused by nonbiological factors in data collection

    Explanation

    Batch effects are unwanted variation arising from nonbiological aspects of data collection or processing.

  65. 65

    Which experimental-design practice helps prevent batch effects?

    1. A

      Choosing the model with the largest number of predictors

    2. B

      Randomizing sample run times rather than processing cases before controls

    3. C

      Collecting all samples in one batch without randomization

    4. D

      Processing all cases first and all controls afterward

    Correct answer
    B

    Randomizing sample run times rather than processing cases before controls

    Explanation

    Randomizing run times helps prevent biological groups from becoming confounded with processing batches.

  66. 66

    Why is it useful to fit a model using data from multiple laboratories or institutions?

    1. A

      It eliminates the need for any test-set evaluation

    2. B

      It guarantees that the model will have zero training error

    3. C

      It ensures that all predictors become statistically independent

    4. D

      It can reduce dependence on idiosyncratic variation from one data source

    Correct answer
    D

    It can reduce dependence on idiosyncratic variation from one data source

    Explanation

    Using multiple data sources can make a model less dependent on site-specific effects and improve the assessment of generalizability.

  67. 67

    How should biomedical machine-learning results ideally be validated?

    1. A

      On the same observations used to fit the final model

    2. B

      On an independent data set collected in a different laboratory or institution

    3. C

      By checking whether the model contains every available feature

    4. D

      Only through the model's training error

    Correct answer
    B

    On an independent data set collected in a different laboratory or institution

    Explanation

    Independent validation from a different laboratory or institution can reveal whether apparent performance was caused by batch effects or other site-specific factors.

  68. 68

    Why can batch effects make a model appear more successful than it really is?

    1. A

      They can create patterns that improve apparent test performance without reflecting biology

    2. B

      They prevent the model from fitting the training data at all

    3. C

      They force every coefficient estimate to be exactly zero

    4. D

      They always increase the model's bias while leaving all predictions unchanged

    Correct answer
    A

    They can create patterns that improve apparent test performance without reflecting biology

    Explanation

    Batch-related variation can create misleading associations, so even test error may look good unless evaluation uses appropriately independent data.

  69. 69

    What was the main point about normally distributed errors in large-sample settings?

    1. A

      Normality matters more than the ratio of sample size to model complexity

    2. B

      Non-normal errors automatically make every supervised model invalid

    3. C

      Normality is always required regardless of sample size or model complexity

    4. D

      Non-normal errors are often not a major problem when the sample size is sufficiently large

    Correct answer
    D

    Non-normal errors are often not a major problem when the sample size is sufficiently large

    Explanation

    The content emphasized that non-normal errors are often tolerable with a large sample size; excessive model complexity relative to the data is the more serious concern.

  70. 70

    What is the primary danger described by the curse of dimensionality?

    1. A

      Adding variables always reduces both training and test error

    2. B

      Adding many measured variables can encourage overly complex models with high test error

    3. C

      High-dimensional data cannot be analyzed using any supervised method

    4. D

      More variables automatically guarantee better biological information

    Correct answer
    B

    Adding many measured variables can encourage overly complex models with high test error

    Explanation

    The curse of dimensionality refers to the danger that many features, especially with limited observations, lead to excessive complexity and poor generalization.

  71. 71

    Why is counting predictors insufficient for comparing the complexity of different modeling methods?

    1. A

      Methods such as ridge regression can use all predictors while having different effective complexity

    2. B

      Decision trees and lasso models cannot contain predictors

    3. C

      Predictor count is meaningful only for classification problems

    4. D

      Every method uses exactly the same number of effective parameters

    Correct answer
    A

    Methods such as ridge regression can use all predictors while having different effective complexity

    Explanation

    For ridge regression, all PPP predictors remain in the model even when shrinkage makes it less flexible. Thus, raw predictor count does not capture effective complexity across methods.

  72. 72

    How should two very different supervised-learning models generally be compared?

    1. A

      Choose the model with the larger training R2R^2R2

    2. B

      Compare only the number of predictors they contain

    3. C

      Choose the model with the most complicated mathematical form

    4. D

      Compare their estimated test errors

    Correct answer
    D

    Compare their estimated test errors

    Explanation

    Test error is a common quantity that can be compared across models with different structures, such as trees, lasso models, and ridge models.

  73. 73

    Which statement best summarizes the lecture's view of supervised-learning methods?

    1. A

      There is no universally best method, but methods can be applied incorrectly

    2. B

      Decision trees are always superior because they are interpretable

    3. C

      One method is always best if it has the smallest training error

    4. D

      Least squares is always best when the number of predictors is large

    Correct answer
    A

    There is no universally best method, but methods can be applied incorrectly

    Explanation

    Different methods perform better in different settings. There is no universally best approach, but incorrect procedures, such as incorrect cross-validation, can produce invalid conclusions.

  74. 74

    What is the most important quantity to focus on when evaluating a predictive model?

    1. A

      Correctly estimated test error

    2. B

      The apparent statistical significance of the fitted model

    3. C

      The number of predictors included

    4. D

      The training error alone

    Correct answer
    A

    Correctly estimated test error

    Explanation

    The central message is that predictive usefulness depends on low, correctly estimated test error rather than merely excellent training fit or model significance.

Question 1 of 74
Question 1 of 74

Ask anything

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

FlashcardsQuizFill in the blanksWritten testLessonNotesPodcastContent