# 1 模型概述 - Model Representation

To establish notation for future use, we’ll use

• x(i) denote the “input” variables (living area in this example), also called input features, and
• y(i) denote the “output” or target variable that we are trying to predict (price).

A pair (x(i),y(i)) is called a training example the dataset 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. the superscript “(i)” in the notation is simply `an index` into the training set, and has nothing to do with exponentiation

• X denote the space of input values
• Y denote 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 → 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

• regression problem When the target variable that we’re trying to predict is`continuous`, such as in our housing example
• classification problem When y can take on only a small number of discrete values (such as if, given the living area, we wanted to predict if a dwelling is a house or an apartment, say) 简单的介绍了一下数据集的表示方法，并且提出来h（hypothesis），即通过训练得出来的一个假设函数，通过输入x，得出来预测的结果y。并在最后介绍了线性回归方程

# 2 代价函数 - Cost Function

`J(θ0,θ1)=12m∑i=1m(y^i−yi)2=12m∑i=1m(hθ(xi)−yi)2`

To break it apart, it is 1/2 x ̄ where x ̄ is the mean of the squares of hθ(xi)−yi , or the difference between the predicted value and the actual value. This function is otherwise called the`Squared error function`, or `Mean squared error`. The mean is halved (1/2)as a convenience for the computation of the gradient descent, as the derivative term of the square function will cancel out the 1/2 term. The following image summarizes what the cost function does:

# 3 代价函数(一)

0 条评论

• ### 机器学习实战(一) - 绪论 : 初识机器学习

监督式学习就是指，首先需要提供一些数据集，对于数据集中的每个数据，都有相应的正确答案，（训练集）算法就是基于这些正确的答案来做出预测。又分为回归问题和分类问题。

• ### Spring Security权限框架理论与实战(五)- 自定义决策AbstractAccessDecisionManager

ASM是Java中比较流行的用来读写字节码的类库，用来基于字节码层面对代码进行分析和转换。

• ### Fitting a line through data一条穿过数据的拟合直线

Now, we get to do some modeling! It's best to start simple; therefore, we'll loo...

• ### Palabos Tutorial 2/3:Understanding the multi-block structure

The code structure of Palabos programs is driven by the duality between atomic-b...

• ### Oops错误

在at91rm9200下写了一个spi的驱动，加载后，运行测试程序时，蹦出这么个吓人的东西： Unable to handle kernel paging r...