1. Home
  2. Explore
  3. Computer Science
  4. Introduction to Machine Learning

Study methods

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

Introduction to Machine Learning

  • 53Unfamiliar
  • 0Learning
  • 0Familiar
  • 0Mastered
Topic: Applications and Motivation

What broad pattern do the machine-learning examples in the lecture share?

53 questions

  1. 1

    What broad pattern do the machine-learning examples in the lecture share?

    Model answer

    They begin with data and use a method to make a decision or prediction from it.

    Explanation

    The examples involve different kinds of data and decisions, but all use data to support an automated decision.

  2. 2

    How can machine learning help scientists identify exoplanets?

    Model answer

    It can analyze signals from telescope data to distinguish candidate exoplanets from objects or signals that are not exoplanets.

    Explanation

    The method classifies telescope-based candidates as exoplanets or something else.

  3. 3

    In the neonatal seizure example, what data are analyzed and what decision is made?

    Model answer

    The method analyzes EEG data to decide whether a newborn's movement indicates a seizure.

    Explanation

    The goal is to automate recognition that would otherwise require labor-intensive interpretation.

  4. 4

    How can machine learning support analysis of Supreme Court petitions?

    Model answer

    It can analyze the text of petitions to identify their topics or themes.

    Explanation

    Automated analysis helps process thousands of petitions without reading each one individually.

  5. 5

    What task did the Bureau of Labor Statistics want to automate with machine learning?

    Model answer

    It wanted to assign codes to text from interviews and surveys, such as codes for occupations or workplace events.

    Explanation

    Examples include identifying references to occupations such as janitors or events such as workplace injuries.

  6. 6

    How can machine learning be used to detect phishing emails?

    Model answer

    It can analyze email text and classify an email as phishing or not, potentially before it reaches a user's inbox.

    Explanation

    This can help prevent users from being deceived into revealing passwords or other sensitive information.

  7. 7

    What decision might a facial-recognition system make, and what concern can arise from that decision?

    Model answer

    It may identify a person in surveillance footage; misidentifying someone can have serious consequences, such as wrongly implicating them in a crime.

    Explanation

    The lecture highlights the societal stakes of errors in facial recognition.

  8. 8

    How might machine learning help determine whether to give a farmer a loan?

    Model answer

    It can use information such as satellite images of the farm and weather data to estimate whether the farm can earn enough to repay the loan.

    Explanation

    The prediction is used to inform the loan decision.

  9. 9

    Besides automating tasks, why is it important to understand machine learning systems?

    Model answer

    Their decisions can affect areas such as medicine, finance, security, and government, so understanding how they work helps people assess their effects and whether they work as intended.

    Explanation

    The lecture emphasizes both the impact of deployed systems and the need to evaluate claims about them.

  10. 10

    Why should machine learning be treated as a tool rather than as magic?

    Model answer

    It is useful in some situations but not all, and its effectiveness depends on the problem and data; it cannot be assumed to answer every question well.

    Explanation

    The lecture describes a large prediction challenge where even strong modern methods did not predict outcomes well.

  11. 11

    What role does mathematics play in machine learning, according to the lecture?

    Model answer

    Mathematics is a fundamental foundation of machine learning and is needed to understand its methods and inner workings.

    Explanation

    The lecture connects the mathematical prerequisites to the mathematical basis of the subject.

  12. 12

    In the newborn example, what is the purpose of the previously observed, labeled cases?

    Model answer

    They serve as training data for a method that will predict labels for future newborns.

    Explanation

    The observed cases are used to train a method before it is applied to new cases.

  13. 13

    What does nnn represent in the training-data notation?

    Model answer

    It is the number of training data points.

    Explanation

    The lecture denotes the size of the training set by nnn.

  14. 14

    What does the index iii identify, and what does x(i)x^{(i)}x(i) denote?

    Model answer

    The index iii identifies a data point, and x(i)x^{(i)}x(i) is that point's feature vector.

    Explanation

    The superscript indicates which example in the data set the feature vector belongs to.

  15. 15

    What information does a feature vector contain, and how is its dimension represented?

    Model answer

    It contains the measured features for one data point; a ddd-dimensional feature vector has components x1x_1x1​ through xdx_dxd​ and belongs to Rd\mathbb{R}^dRd.

    Explanation

    The lecture represents each example's measured characteristics as a vector in a Euclidean space.

  16. 16

    Why can a two-dimensional drawing of data be misleading about a real machine-learning problem?

    Model answer

    The drawing is only a visualization; real feature vectors may have more than two dimensions, such as the 555555 features in the neonatal-seizure study described.

    Explanation

    The lecture uses two-dimensional cartoons even though practical feature spaces can be much higher-dimensional.

  17. 17

    In the lecture's cartoon newborn example, what do x1x_1x1​, x2x_2x2​, and the labels represent?

    Model answer

    The features are imagined as oxygen intake and movement, while −1-1−1 means no seizure and 111 means a seizure.

    Explanation

    These meanings are illustrative assumptions for the cartoon example, not a description of the actual medical feature construction.

  18. 18

    How are labels obtained in the supervised newborn example, and why is constructing features nontrivial?

    Model answer

    An expert supplies the labels, while turning complex measurements such as EEG data into useful features requires substantial work.

    Explanation

    The lecture notes that the actual study derived a 555555-dimensional feature representation from complex EEG data.

  19. 19

    How is the complete set of training examples denoted, and what does each example contain?

    Model answer

    It is denoted by DnD_nDn​ and consists of pairs of a feature vector and its label, (x,y)(x,y)(x,y).

    Explanation

    Collecting the feature-label pairs gives the training data set used by the learning method.

  20. 20

    What is the goal of using the labeled newborn data?

    Model answer

    The goal is to predict whether a future newborn will have a seizure so that appropriate monitoring or medical care can be provided.

    Explanation

    The desired predictions concern new cases, not merely the already labeled examples.

  21. 21

    What is a hypothesis in the classification setting described?

    Model answer

    A hypothesis is a function that maps a feature vector to a label, such as a function from Rd\mathbb{R}^dRd to {−1,1}\{-1,1\}{−1,1}.

    Explanation

    It specifies how to label any possible input in the feature space.

  22. 22

    Why is the rule h(x)=1h(x)=1h(x)=1 for every xxx a hypothesis but not necessarily a good one?

    Model answer

    It is a hypothesis because it is a function from inputs to labels, but it is poor for distinguishing positive from negative cases because it predicts 111 for all of them.

    Explanation

    Being a valid labeling rule does not guarantee that a rule makes useful predictions.

  23. 23

    What is a hypothesis class?

    Model answer

    A hypothesis class is a collection of hypotheses.

    Explanation

    The lecture uses H\mathcal{H}H to denote a set of candidate prediction functions.

  24. 24

    What defines the linear-classifier hypothesis class introduced in the lecture?

    Model answer

    It contains classifiers that assign label 111 on one side of a line or hyperplane and label −1-1−1 on the other side.

    Explanation

    Different choices of the separating boundary and its orientation give different classifiers in the class.

  25. 25

    How does the dot product θTx\theta^T xθTx relate to the projection of xxx onto θ\thetaθ?

    Model answer

    The scalar projection of xxx onto θ\thetaθ is θTx∥θ∥\frac{\theta^T x}{\|\theta\|}∥θ∥θTx​.

    Explanation

    The dot product divided by the length of θ\thetaθ measures the component of xxx in the direction of θ\thetaθ.

  26. 26

    Why is θTx\theta^T xθTx a scalar when xxx and θ\thetaθ are ddd-dimensional column vectors?

    Model answer

    The transpose θT\theta^TθT has dimensions 1×d1\times d1×d, and multiplying it by xxx, which has dimensions d×1d\times 1d×1, produces a 1×11\times 11×1 result.

    Explanation

    The inner dimensions match, and the resulting outer dimensions make the product a scalar.

  27. 27

    What happens to the projection of xxx onto θ\thetaθ if θ\thetaθ is multiplied by a positive constant, and why?

    Model answer

    The projection is unchanged because the constant scales both the numerator and denominator of θTx∥θ∥\frac{\theta^T x}{\|\theta\|}∥θ∥θTx​ by the same amount.

    Explanation

    Scaling θ\thetaθ changes its length but not its direction, so the component of xxx along that direction is unchanged.

  28. 28

    What is the projection of a vector xxx onto θ\thetaθ when xxx is perpendicular to θ\thetaθ?

    Model answer

    It is zero, because xxx has no component in the direction of θ\thetaθ.

    Explanation

    Perpendicular vectors have dot product zero, so the projection θTx∥θ∥\frac{\theta^T x}{\|\theta\|}∥θ∥θTx​ is zero.

  29. 29

    What geometric set is described by θTx=0\theta^T x=0θTx=0?

    Model answer

    It is the set of points whose vectors are perpendicular to θ\thetaθ; in two dimensions it is a line through the origin, and in higher dimensions it is a hyperplane.

    Explanation

    Every point on this boundary has zero projection onto θ\thetaθ.

  30. 30

    What does the equation θTx=a∥θ∥\theta^T x=a\|\theta\|θTx=a∥θ∥ describe geometrically?

    Model answer

    It describes a line or hyperplane whose points have projection aaa onto θ\thetaθ, parallel to the zero-projection boundary.

    Explanation

    Fixing the projection at a constant gives a boundary displaced from the one defined by θTx=0\theta^T x=0θTx=0.

  31. 31

    How can the boundary defined by a fixed projection be written using an offset parameter?

    Model answer

    It can be written as θTx+θ0=0\theta^T x+\theta_0=0θTx+θ0​=0, where θ0\theta_0θ0​ is a constant offset.

    Explanation

    The offset absorbs the constant associated with the projection level and the length of θ\thetaθ.

  32. 32

    What roles do θ\thetaθ and θ0\theta_0θ0​ play in a linear classifier?

    Model answer

    Together, they define the separating boundary; θ\thetaθ determines its orientation and θ0\theta_0θ0​ sets its offset.

    Explanation

    Changing these values changes which points lie on each side of the boundary.

  33. 33

    How does a linear classifier assign labels based on θTx+θ0\theta^T x+\theta_0θTx+θ0​?

    Model answer

    It assigns 111 when θTx+θ0>0\theta^T x+\theta_0>0θTx+θ0​>0 and −1-1−1 when θTx+θ0<0\theta^T x+\theta_0<0θTx+θ0​<0.

    Explanation

    The sign of the expression identifies which side of the boundary the point occupies.

  34. 34

    How does the lecture define the label for a point exactly on the linear boundary?

    Model answer

    It assigns the label −1-1−1 when θTx+θ0=0\theta^T x+\theta_0=0θTx+θ0​=0.

    Explanation

    The boundary case requires a convention; the lecture chooses to include equality with the negative side.

  35. 35

    What is the difference between the inputs to a hypothesis and its parameters?

    Model answer

    The input is the feature vector xxx being classified; parameters such as θ\thetaθ and θ0\theta_0θ0​ specify which hypothesis is being used.

    Explanation

    Parameters are part of the classifier's definition, not the data point supplied to it.

  36. 36

    Why is predicting well on future data the ultimate goal, and why can that performance not be directly calculated in advance?

    Model answer

    Future performance matters because predictions should support good decisions for new cases, but calculating it requires the future cases and their true labels, which are not yet available.

    Explanation

    The lecture calls evaluation on genuinely future labeled data desirable but inaccessible at prediction time.

  37. 37

    What is a loss function, and what do its arguments represent?

    Model answer

    A loss function L(g,a)L(g,a)L(g,a) measures the cost of a prediction, where ggg is the guess and aaa is the actual value.

    Explanation

    A loss expresses how undesirable a guess is relative to what actually happened.

  38. 38

    How does loss relate to utility?

    Model answer

    Loss can be viewed as negative utility: greater loss is worse, while greater utility is better.

    Explanation

    The two quantities express desirability in opposite directions.

  39. 39

    How does zero-one loss score a classification guess?

    Model answer

    It assigns loss 000 when the guess equals the actual label and loss 111 when they differ.

    Explanation

    This loss records whether the classification is correct, without distinguishing types of error.

  40. 40

    Why can zero-one loss be inadequate for a medical classification problem?

    Model answer

    It treats all mistakes equally, even when a false negative may be much more harmful than a false positive.

    Explanation

    Failing to detect a seizure could prevent necessary care, whereas a false alarm may mainly use extra resources.

  41. 41

    What is the difference between a false positive and a false negative in the seizure example?

    Model answer

    A false positive predicts a seizure when there is none; a false negative predicts no seizure when one is occurring.

    Explanation

    The latter can be especially serious because it may prevent the newborn from receiving needed medical attention.

  42. 42

    Why might a classification loss be asymmetric, and how should its relative penalties be chosen?

    Model answer

    An asymmetric loss assigns different costs to different kinds of mistakes when their consequences differ; the appropriate balance depends on the application.

    Explanation

    In the seizure example, the cost of missing a seizure may exceed the cost of an unnecessary response, but the balance must be considered for each use case.

  43. 43

    What does test error measure in the lecture's setup?

    Model answer

    It is the average loss of a classifier on n′n'n′ new, labeled data points: 1n′∑i=n+1n+n′L(h(x(i)),y(i))\frac{1}{n'}\sum_{i=n+1}^{n+n'}L(h(x^{(i)}),y^{(i)})n′1​∑i=n+1n+n′​L(h(x(i)),y(i)).

    Explanation

    It evaluates predictions on data beyond the original nnn training examples.

  44. 44

    What is training error, and why can it be calculated when future test error cannot?

    Model answer

    Training error is the average loss on the available training examples, En(h)=1n∑i=1nL(h(x(i)),y(i))E_n(h)=\frac{1}{n}\sum_{i=1}^{n}L(h(x^{(i)}),y^{(i)})En​(h)=n1​∑i=1n​L(h(x(i)),y(i)); the training examples and their labels are already known.

    Explanation

    Unlike future test error, training error uses data that are currently available, though it is only a proxy for future performance.

  45. 45

    How can training error be used to compare two classifiers?

    Model answer

    Prefer hhh to h~\tilde hh~ under this criterion when En(h)<En(h~)E_n(h)<E_n(\tilde h)En​(h)<En​(h~).

    Explanation

    The comparison selects the classifier with the lower average loss on the training data.

  46. 46

    What does a learning algorithm do, and how does it differ from a classifier?

    Model answer

    A learning algorithm takes a data set as input and returns a classifier; a classifier takes a feature vector as input and returns a label.

    Explanation

    The two functions operate on different inputs and produce different outputs.

  47. 47

    Why can the same learning algorithm return different classifiers for different data sets?

    Model answer

    Its output depends on the data set it receives, so changing the training data can produce a different classifier.

    Explanation

    The learning algorithm maps data sets to hypotheses, while a classifier maps feature vectors to labels.

  48. 48

    What is the difference between a parameter and a hyperparameter in the lecture's terminology?

    Model answer

    A parameter specifies a particular hypothesis, while a hyperparameter is a setting of the learning algorithm that is not part of its data input.

    Explanation

    For example, θ\thetaθ and θ0\theta_0θ0​ define a classifier, whereas kkk controls how many candidate classifiers the example algorithm considers.

  49. 49

    What does the example learning algorithm do with its candidate classifiers?

    Model answer

    It calculates each candidate's training error and returns the classifier with the smallest error among those considered.

    Explanation

    The algorithm uses training error as its criterion for selecting a classifier.

  50. 50

    In the candidate-search algorithm, what does kkk control?

    Model answer

    It controls how many of the pre-generated candidate classifiers are considered, with kkk restricted to be less than the total number generated.

    Explanation

    The example uses a list of a trillion candidates and evaluates candidates 111 through kkk.

  51. 51

    What classifier does the example algorithm return when k=1k=1k=1?

    Model answer

    It returns the first candidate, h(1)h^{(1)}h(1), because that is the only classifier considered.

    Explanation

    With only one candidate, that candidate necessarily has the minimum error among the set.

  52. 52

    How does increasing kkk from 111 to 222 affect the selected classifier's training error?

    Model answer

    The training error cannot increase; the algorithm selects the lower-error candidate from h(1)h^{(1)}h(1) and h(2)h^{(2)}h(2), allowing the error to stay the same or decrease.

    Explanation

    Adding a candidate expands the choices while retaining the previous candidate, so the minimum training error cannot be higher.

  53. 53

    Why does lower training error from considering more candidates not by itself establish better future performance?

    Model answer

    The selection rule minimizes error on the training data, whereas performance on future data is the true goal and cannot be directly assessed before those data are available.

    Explanation

    Training error is a useful criterion in the example, but the lecture leaves the question of generalization and evaluation for further study.

1 of 53
Question 1 of 53

Ask anything

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

FlashcardsQuizFill in the blanksWritten testLessonNotesPodcastContent