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

  • 95Unfamiliar
  • 0Learning
  • 0Familiar
  • 0Mastered
Topic: Learning Foundations
  • spaceFlip card
  • KI knew it
  • DI didn't know it
  • ←Previous card
  • →Next card

What are the two main types of machine learning?

Tap to flipClick to flipspace

Supervised learning and unsupervised learning.

Or swipe the card

95 cards

  1. What are the two main types of machine learning?

    Supervised learning and unsupervised learning.

  2. What is the goal of supervised learning?

    To use a data set of features, XXX, to predict or detect an association with a response, yyy.

  3. What is the goal of unsupervised learning?

    To discover signal or structure in a feature matrix, XXX, when no response, yyy, is available.

  4. What determines whether a supervised learning problem is regression or classification?

    The type of response, yyy: quantitative responses imply regression, while categorical responses imply classification.

  5. Give examples of quantitative responses suitable for regression.

    Blood pressure, cholesterol level, and tumor size.

  6. Give examples of categorical responses suitable for classification.

    Tumor versus normal tissue, heart disease versus no heart disease, and disease subtype.

  7. Does the type of data in XXX determine whether a problem is regression or classification?

    No. The framework is determined by the type of yyy, even if XXX contains quantitative or categorical features.

  8. How does supervised learning with survival time differ from ordinary regression?

    Survival time may be censored because subjects die, drop out, or remain unobserved, making it a distinct supervised learning setting.

  9. What does a linear model use to predict the response for observation iii?

    It uses an intercept, feature values x_{i1},dots,x_{iP}, coefficients, and a noise term: y_i = eta_0 + eta_1x_{i1} + dots + eta_Px_{iP} + epsilon_i.

  10. What do nnn, PPP, yiy_iyi​, and xijx_{ij}xij​ represent in a linear model?

    nnn is the number of observations, PPP is the number of features, yiy_iyi​ is the response for observation iii, and xijx_{ij}xij​ is feature jjj for observation iii.

  11. What is the purpose of estimating eta_0,eta_1,dots,eta_P?

    To fit the linear model so it can predict the response from the observed features.

  12. What is the least squares criterion for fitting a linear model?

    Choose coefficient estimates that minimize the residual sum of squares: sum_{i=1}^{n}(y_i-hat{y}_i)^2.

  13. What are the residual sum of squares and sum of squared errors?

    They are two names for sum_{i=1}^{n}(y_i-hat{y}_i)^2, the total squared discrepancy between observed and fitted responses.

  14. What is hat{y}_i in a fitted linear model?

    The predicted or fitted value for observation iii, obtained by plugging its features into the estimated model.

  15. When does least squares work especially well?

    When the number of observations nnn is large and the number of features PPP is small.

  16. In a model with two predictors, what geometric object is the least squares fit?

    A plane in three-dimensional space.

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

    The residuals y_i-hat{y}_i.

  18. What is a training set?

    The data used to fit or estimate a machine learning model.

  19. What is training error in regression?

    The mean squared error calculated on the training data: frac{1}{n}sum_{i=1}^{n}(y_i-hat{y}_i)^2.

  20. Why is training error usually small for the model used to calculate it?

    The coefficients were chosen specifically to minimize error on the training data.

  21. Why is training error not a reliable measure of predictive performance?

    It measures fit to data already used for training, not performance on new observations whose responses are unknown.

  22. How are training error and R2R^2R2 related as model complexity increases?

    As complexity increases, training error decreases or stays the same, while R2R^2R2 increases or stays the same.

  23. Why can adding variables make training performance misleading?

    Training error is guaranteed not to increase when variables are added, even if the extra variables harm performance on new data.

  24. What is test error?

    The average squared prediction error on observations not used to fit the model: frac{1}{m}sum(y_{text{test}}-hat{y}_{text{test}})^2.

  25. What is the primary criterion for choosing a supervised learning model?

    Choose the model with the smallest estimated test error.

  26. How does test error typically change as model complexity increases?

    It often decreases at first, reaches a minimum at an intermediate complexity, and then increases.

  27. What is overfitting?

    Fitting a model with low training error but high test error.

  28. How can a least squares model overfit even when it appears simple?

    With too little data, such as only two observations, even a one-predictor linear model can fit the training data perfectly but predict new data poorly.

  29. What is model complexity?

    The general flexibility of a model, or its ability to fit varied patterns in the data; it is not limited to the number of variables.

  30. How does model complexity affect training error?

    Increasing model complexity decreases or leaves training error unchanged.

  31. What is the bias of an estimator hat{beta}?

    The average difference between the true parameter beta and hat{beta} across repeated experiments.

  32. What is the variance of an estimator hat{beta}?

    The amount by which estimates hat{beta} vary across repeated experiments.

  33. How does increasing model complexity affect bias and variance?

    It generally decreases bias but increases variance.

  34. What is the bias-variance relationship to test error?

    Test error is associated with the sum of squared bias and variance.

  35. What characterizes a model with very low complexity?

    It tends to have high bias and low variance, often producing high test error through underfitting.

  36. What characterizes a model with very high complexity?

    It tends to have low bias and high variance, often producing high test error through overfitting.

  37. What is the bias-variance 'sweet spot'?

    An intermediate level of model complexity where both squared bias and variance are reasonably small.

  38. What is the validation set approach for estimating test error?

    Split the observations into a training set and a validation set, fit the model on the training set, and calculate error on the validation set.

  39. What is the main weakness of the validation set approach?

    The estimate depends on the arbitrary split of the data into two sets.

  40. What are the steps in leave-one-out cross-validation?

    For each of the nnn observations, leave that observation out, fit the model on the other n−1n-1n−1 observations, predict the omitted observation, and average the nnn errors.

  41. What is the main advantage of leave-one-out cross-validation?

    It systematically uses every observation once as a test observation.

  42. What is the main disadvantage of leave-one-out cross-validation?

    It requires fitting nnn models, making it computationally expensive for large data sets.

  43. What are the steps in kkk-fold cross-validation?

    Divide the data into kkk subsets, train on k−1k-1k−1 subsets, evaluate on the remaining subset, repeat so every subset is held out once, and average the kkk errors.

  44. What happens in five-fold cross-validation?

    The data are divided into five sets; each model is trained on four sets and evaluated on the fifth, and the five error estimates are averaged.

  45. Why must test error be estimated when fitting a model?

    To avoid selecting a model that has excellent training error but poor performance on unseen data.

  46. Why can least squares be unsuitable for biomedical big data?

    There may be many more features than observations, causing least squares to fit an overly complex model and overfit.

  47. What is regularization or penalization?

    A modeling strategy that adds a penalty for complexity to the fitting objective.

  48. What are ridge regression and the lasso?

    They are regularized alternatives to least squares that reduce model complexity by shrinking regression coefficients.

  49. What objective does ridge regression minimize?

    sum_{i=1}^{n}(y_i-hat{y}_i)^2+lambdasum_{j=1}^{P}beta_j^2.

  50. What does the ridge tuning parameter lambda control?

    The strength of the penalty and therefore the complexity of the fitted model.

  51. What happens in ridge regression when lambda=0?

    The penalty disappears, so ridge regression becomes ordinary least squares.

  52. What happens to ridge coefficients as lambda becomes very large?

    The coefficient estimates approach zero, producing a very simple, low-variance model.

  53. Does ridge regression perform feature selection?

    No. Ridge shrinks coefficients toward zero but generally retains all PPP variables in the final model.

  54. How should lambda be selected for ridge regression?

    Choose the value that minimizes estimated test error, typically using a validation set or cross-validation.

  55. After selecting lambda using a validation procedure, how should the final ridge model be fit?

    Refit ridge regression on the full data set using the selected value of lambda.

  56. What objective does the lasso minimize?

    sum_{i=1}^{n}(y_i-hat{y}_i)^2+lambdasum_{j=1}^{P}|\beta_j|.

  57. What is the key difference between the ridge and lasso penalties?

    Ridge uses beta_j^2, whereas the lasso uses ∣βj∣|\beta_j|∣βj​∣.

  58. What important property does the lasso have that ridge regression generally lacks?

    The lasso can shrink some coefficient estimates exactly to zero.

  59. What does it mean that the lasso performs feature selection?

    It sets the coefficients of some features exactly to zero, leaving only a subset of features in the model.

  60. What happens to the lasso when lambda=0?

    It reduces to ordinary least squares.

  61. How does increasing lambda affect lasso sparsity?

    It generally forces more coefficients to become exactly zero, producing a sparser model.

  62. What is the main advantage of the lasso in a gene-expression prediction problem?

    It can predict an outcome using only a small subset of thousands of measured genes.

  63. What is principal components regression (PCR)?

    A dimension-reduction method that replaces the original predictors with a selected number of principal components and fits least squares using those components.

  64. What are principal components?

    Linear combinations of the original variables that capture as much variability in the data as possible.

  65. How does PCR reduce model complexity?

    It fits the model using only the first mmm principal components, where m<Pm<Pm<P.

  66. Is a PCR model linear in the original predictors?

    Yes. Because the principal components are linear combinations of the original predictors, PCR is still linear in those predictors.

  67. Does PCR perform feature selection?

    No. All original predictors generally contribute to the principal components and therefore remain involved in the final model.

  68. What happens in PCR when m=Pm=Pm=P?

    PCR becomes equivalent to least squares using all principal components.

  69. How is the number of principal components selected in PCR?

    Choose the value of mmm that minimizes estimated test error.

  70. Why can PCR fail to predict the response well?

    The principal components that explain the most predictor variation are not guaranteed to be the components most predictive of yyy.

  71. How can a linear model be made more complex when least squares is too simple?

    Add transformations and combinations of features, such as xj2x_j^2xj2​, xj3x_j^3xj3​, exponential transformations, or products like xjxkx_jx_kxj​xk​.

  72. What is the relationship between regression and classification methods in this material?

    The same general ideas—model complexity, overfitting, regularization, and test-error estimation—apply to both.

  73. What is a decision tree?

    A supervised learning model that partitions the feature space into regions or boxes and makes a prediction within each region.

  74. Why are decision trees highly interpretable?

    Their predictions can be read as a sequence of simple yes/no rules based on feature values.

  75. How is a regression-tree prediction calculated within a terminal region?

    It is the average response of the training observations belonging to that region.

  76. How are splits interpreted in a decision tree?

    For a displayed threshold, a 'yes' answer follows the left branch and a 'no' answer follows the right branch.

  77. How can salary be represented in the baseball regression-tree example?

    Salary is modeled on a logarithmic scale; a terminal value such as 5.1835.1835.183 corresponds to e5.183e^{5.183}e5.183 thousand dollars.

  78. What is the main reason to use a decision tree?

    Interpretability: the model provides a simple visual rule system that people can quickly understand and apply.

  79. How do regression trees typically compare with other supervised learning methods in accuracy?

    They are often less accurate, but they provide greater interpretability.

  80. How does tree size affect bias and variance?

    A large tree tends to have low bias and high variance, while a small tree tends to have low variance and potentially high bias.

  81. How should the size of a decision tree be selected?

    Estimate test error for different tree sizes and choose the size with the best predictive performance.

  82. What are batch effects?

    Variability in data caused by nonbiological factors, such as differences in experimental batches, laboratories, or processing conditions.

  83. Why can batch effects invalidate machine learning results?

    They can create apparent predictive patterns that reflect experimental conditions rather than biology, producing misleadingly good test error.

  84. How can randomization reduce batch effects?

    Randomize sample run times and avoid processing all cases before all controls.

  85. What other experimental-design strategy helps prevent batch effects?

    Reduce extraneous sources of variation in the experiment before collecting or analyzing the data.

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

    It helps expose the model to varied experimental conditions rather than allowing it to rely on artifacts from one data source.

  87. How should biomedical machine learning results be validated?

    Validate them on independent data collected in a different laboratory or institution.

  88. Is there one best supervised machine learning method?

    No. Different approaches work better in different settings, although some implementations can be incorrect.

  89. What is the central practical principle for supervised machine learning?

    Focus on correctly estimating and minimizing test error.

  90. Why is greater model complexity not automatically better?

    Complexity can reduce bias but increase variance and test error through overfitting.

  91. How important is Gaussianity of errors in large-sample supervised learning?

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

  92. What is the curse of dimensionality in this context?

    The difficulty that arises when many features or dimensions make models more complex and increase the risk of high test error.

  93. Why can degrees of freedom be counted by variables for least squares but not for many other methods?

    For ordinary least squares, complexity corresponds simply to the number of variables, but shrinkage, principal components, and tree structure make complexity more nuanced in other methods.

  94. Why is test error useful for comparing models with different structures?

    It is a common predictive-performance measure that can be compared across models such as trees, lasso models, and ridge models.

  95. What makes an incorrect cross-validation procedure especially dangerous?

    It produces an incorrect test-error estimate and can lead to selecting a poor model.

Card 1 of 95
Card 1 of 95

Ask anything

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

FlashcardsQuizFill in the blanksWritten testLessonNotesPodcastContent