Introduction to Machine Learning
- 53Unfamiliar
- 0Learning
- 0Familiar
- 0Mastered
What broad pattern do the machine-learning examples in the lecture share?
53 questions
- 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
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
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
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
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
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
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
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
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
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
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
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
What does n 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 n.
- 14
What does the index i identify, and what does x(i) denote?
Model answer
The index i identifies a data point, and x(i) is that point's feature vector.
Explanation
The superscript indicates which example in the data set the feature vector belongs to.
- 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 d-dimensional feature vector has components x1​ through xd​ and belongs to Rd.
Explanation
The lecture represents each example's measured characteristics as a vector in a Euclidean space.
- 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 55 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
In the lecture's cartoon newborn example, what do x1​, x2​, and the labels represent?
Model answer
The features are imagined as oxygen intake and movement, while −1 means no seizure and 1 means a seizure.
Explanation
These meanings are illustrative assumptions for the cartoon example, not a description of the actual medical feature construction.
- 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 55-dimensional feature representation from complex EEG data.
- 19
How is the complete set of training examples denoted, and what does each example contain?
Model answer
It is denoted by Dn​ and consists of pairs of a feature vector and its label, (x,y).
Explanation
Collecting the feature-label pairs gives the training data set used by the learning method.
- 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
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 to {−1,1}.
Explanation
It specifies how to label any possible input in the feature space.
- 22
Why is the rule h(x)=1 for every x 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 1 for all of them.
Explanation
Being a valid labeling rule does not guarantee that a rule makes useful predictions.
- 23
What is a hypothesis class?
Model answer
A hypothesis class is a collection of hypotheses.
Explanation
The lecture uses H to denote a set of candidate prediction functions.
- 24
What defines the linear-classifier hypothesis class introduced in the lecture?
Model answer
It contains classifiers that assign label 1 on one side of a line or hyperplane and label −1 on the other side.
Explanation
Different choices of the separating boundary and its orientation give different classifiers in the class.
- 25
How does the dot product θTx relate to the projection of x onto θ?
Model answer
The scalar projection of x onto θ is ∥θ∥θTx​.
Explanation
The dot product divided by the length of θ measures the component of x in the direction of θ.
- 26
Why is θTx a scalar when x and θ are d-dimensional column vectors?
Model answer
The transpose θT has dimensions 1×d, and multiplying it by x, which has dimensions d×1, produces a 1×1 result.
Explanation
The inner dimensions match, and the resulting outer dimensions make the product a scalar.
- 27
What happens to the projection of x onto θ if θ 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​ by the same amount.
Explanation
Scaling θ changes its length but not its direction, so the component of x along that direction is unchanged.
- 28
What is the projection of a vector x onto θ when x is perpendicular to θ?
Model answer
It is zero, because x has no component in the direction of θ.
Explanation
Perpendicular vectors have dot product zero, so the projection ∥θ∥θTx​ is zero.
- 29
What geometric set is described by θTx=0?
Model answer
It is the set of points whose vectors are perpendicular to θ; 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 θ.
- 30
What does the equation θTx=a∥θ∥ describe geometrically?
Model answer
It describes a line or hyperplane whose points have projection a onto θ, parallel to the zero-projection boundary.
Explanation
Fixing the projection at a constant gives a boundary displaced from the one defined by θTx=0.
- 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, where θ0​ is a constant offset.
Explanation
The offset absorbs the constant associated with the projection level and the length of θ.
- 32
What roles do θ and θ0​ play in a linear classifier?
Model answer
Together, they define the separating boundary; θ determines its orientation and θ0​ sets its offset.
Explanation
Changing these values changes which points lie on each side of the boundary.
- 33
How does a linear classifier assign labels based on θTx+θ0​?
Model answer
It assigns 1 when θTx+θ0​>0 and −1 when θTx+θ0​<0.
Explanation
The sign of the expression identifies which side of the boundary the point occupies.
- 34
How does the lecture define the label for a point exactly on the linear boundary?
Model answer
It assigns the label −1 when θTx+θ0​=0.
Explanation
The boundary case requires a convention; the lecture chooses to include equality with the negative side.
- 35
What is the difference between the inputs to a hypothesis and its parameters?
Model answer
The input is the feature vector x being classified; parameters such as θ and θ0​ specify which hypothesis is being used.
Explanation
Parameters are part of the classifier's definition, not the data point supplied to it.
- 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
What is a loss function, and what do its arguments represent?
Model answer
A loss function L(g,a) measures the cost of a prediction, where g is the guess and a is the actual value.
Explanation
A loss expresses how undesirable a guess is relative to what actually happened.
- 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
How does zero-one loss score a classification guess?
Model answer
It assigns loss 0 when the guess equals the actual label and loss 1 when they differ.
Explanation
This loss records whether the classification is correct, without distinguishing types of error.
- 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
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
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
What does test error measure in the lecture's setup?
Model answer
It is the average loss of a classifier on n′ new, labeled data points: n′1​∑i=n+1n+n′​L(h(x(i)),y(i)).
Explanation
It evaluates predictions on data beyond the original n training examples.
- 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)=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
How can training error be used to compare two classifiers?
Model answer
Prefer h to h~ under this criterion when En​(h)<En​(h~).
Explanation
The comparison selects the classifier with the lower average loss on the training data.
- 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
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
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, θ and θ0​ define a classifier, whereas k controls how many candidate classifiers the example algorithm considers.
- 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
In the candidate-search algorithm, what does k control?
Model answer
It controls how many of the pre-generated candidate classifiers are considered, with k restricted to be less than the total number generated.
Explanation
The example uses a list of a trillion candidates and evaluates candidates 1 through k.
- 51
What classifier does the example algorithm return when k=1?
Model answer
It returns the first candidate, 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
How does increasing k from 1 to 2 affect the selected classifier's training error?
Model answer
The training error cannot increase; the algorithm selects the lower-error candidate from h(1) and 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
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.

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