CS229 Lecture notes 1

CS229 Lecture notes

    Andrew Ng


Supervised learning

监督学习


Lets start by talking about a few examples of supervised learning probliems.

Suppose we have a dataset giving the living areas and prices of 47 houses

from Portland, Oregon:

首先讨论一些例子关于监督学习.

假设我们有一个Porland地区47个关于住房面积与价格的数据集.


We can plot this data:

我们可以画出这些数据


  Given data like this, how can we learn to predict the prices of other houses

in Portland, as a function of the size of their living areas?

  给定数据如上, 怎么才能学习一个方法在Portland地区根据居住面积预测房屋价格?


  To establish notation for future use, we'll use x^{(i)} to denote the "input"

variables (living area in this example), also called input features, and y^{(i)}

to denote the "output" or target variable that we are trying to predict (price).

A pair (x^{(i)},y^{(i)}) is called a training example, and the dataset that we'll

be using to learn-a list of m training examples {(x^{(i)},y^{(i)});i=1,\cdots,m}-

is called a training set. Note that the superscript "(i)" in the notation is simply

an index into the training set, and has nothing to do with exponentiation. We

will also use X denote the space of input values, and Y the space of output values.

In this example, X = Y = R.

  建立将来所要适用的符号, 我们使用 x^{(i)} 来表示“输入”变量(例中居住面积),

也成为输入特征, 并且 y^{(i)} 表示我们尝试预测(价格)的“输出” 或目标变量.

一对 (x^{(i)},y^{(i)})  称为一个训练样本, 并且我们将用作学习的 含m 个训练样例

列表的数据集成为训练集. 注意上标 "(i)" 符号在训练集里是一个简单的索引, 并没有

指数的意思. 我们也将使用 X 表示输入变量空间, 且 Y 是输出变量空间.

在这个例子中 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 -> 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:

  稍微正式的描述监督学习问题, 我们的目标是从给定的训练集中学习一个

函数 h : X -> Y 那么 h(x) 是一个 “好的” 预测器,得出相应值y. 由于历史原因

这个函数 h 成为假设. 形象的看出过程是这样的:


  When the target variable that we're trying to predict is continuous, such as in our

housing example, we call the learning problem a regression problem. When y can

take on only small number of discrete values ( sicj as if,given the living area, we 

wanted to predict if a dwelling is a house or an apartment, say ), we call it a classification problem.

  




评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值