一.Key ML Terminology
y
variable in simple linear regression. 是我们想要预测的简单线性回归的y变量
A feature is an input variable describing our data—the x
variable in simple linear regression.描述数据的输入变量,简单线性回归的x变量
In the spam detector example, the features could include the following:
- words in the email text
- sender's address
- time of day the email was sent
- email contains the phrase "one weird trick."
在垃圾邮件的检测例子中,特征值可以是以上的特征。
(3)Example(样本)
Example is a particular instance of data ,x---在检查邮件是否是垃圾邮件中,邮件就是样本。
3.1 Labeled example(被标记样本)
Includes both feature(s) and the label,used to train the model.--被标记样本包括特征值跟标签,用于训练模型,一般由用户提供被标记样本。
labeled examples: {features, label}: (x, y)
在垃圾邮件中,被标记样本就是用户标记的垃圾邮件或者非垃圾邮件。
For example, the following table shows 5 labeled examples from a data set(数据集) containing information about housing prices in California:
housingMedianAge(feature) | totalRooms(feature) | totalBedrooms(feature) | medianHouseValue(label) |
---|---|---|---|
15 | 5612 | 1283 | 66900 |
19 | 7650 | 1901 | 80100 |
17 | 720 | 174 | 85700 |
14 | 1501 | 337 | 73400 |
20 | 1454 | 326 | 65500 |
unlabeled examples: {features, ?}: (x, ?)
Once we've trained our model with labeled examples, we use that model to predict the label on unlabeled examples. In the spam detector, unlabeled examples are new emails that humans haven't yet labeled.
经过标记样本训练后的模型,用于预测未标记样本中的标签。邮件例子中,用户没有标记的邮件就是未标记样本。
(4)Model(模型)
A model defines the relationship between features and label.模型定义了特征值和标签之前的关系
For example, a spam detection model might associate certain features strongly with "spam".
在邮件例子中,模型中会定义了什么样的邮件内容(feature)会被标记为垃圾邮件(标签),里面包含了两者之间的关系。
Let's highlight two phases of a model's life:
Training(训练) means creating or learning the model. That is, you show the model labeled examples and enable the model to gradually learn the relationships between features and label.
训练是指模型逐渐学习特征值和标签之间关系的过程。
Inference(预测,推理)means applying the trained model to unlabeled examples. That is, you use the trained model to make useful predictions (
y'
). For example, during inference, you can predictmedianHouseValue
for new unlabeled examples.预测是指训练过的模型对含有特征值的样本预测其标签的过程。
(5)Regression(回归)vs. classification(分类)
A regression model(回归模型) predicts continuous values. 回归模型用于预测连续型的值
For example, regression models make predictions that answer questions like the following:
What is the value of a house in California?(预测房价)
What is the probability that a user will click on this ad?(预测点击量)
A classification model(分类模型)predicts discrete values. 分类模型用于预测离散值
For example, classification models make predictions that answer questions like the following:
Is a given email message spam or not spam?(预测是否是垃圾邮件)
Is this an image of a dog, a cat, or a hamster?(照片的类型)
classification model(分类模型) | example(样本) |
feature(特征值) | inference(推理) |
label(标签) | model(模型) |
regression(回归) | training(训练) |