
CS229 Fall 2012 2
To establish notation for future use, we’ll use x
(i)
to denote the “ input”
variables (living a r ea in this example), also called input features, and y
(i)
to denote the “output” o r target variable that we are trying to predict
(price). A pair (x
(i)
, y
(i)
) is called a training example, and the data set
that we’ll be using to learn—a list of m training examples {(x
(i)
, y
(i)
); i =
1, . . . , m}—is called a training set. Note that the superscript “(i)” in the
notation is simply an index int o the training set, and has nothing to do with
exp onentiation. We will also use X denote the space of input values, and Y
the space of output values. In this example, X = Y = R.
To describe the supervised learning problem slightly more formally, our
goal is, given a training set, to learn a function h : X 7→ Y so that h(x) is a
“good” predictor for the corresponding value of y. For historical reasons, this
function h is called a hypothesis. Seen pictorially, the process is therefore
like this:
Training
set
house.)
(living area of
Learning
algorithm
h
predicted yx
(predicted price)
of house)
When the target variable t hat we’re trying to predict is continuous, such
as in our housing example, we call the learning problem a regression prob-
lem. When y can take on only a small number of discrete values (such as
if, given the living area, we wanted t o predict if a dwelling is a house or an
apartment, say), we call it a classification problem.
评论