Linear Regression
来源:互联网 发布:东莞网络推广培训班 编辑:程序博客网 时间:2024/05/12 02:21
线性回归的模型很简单。该模型是假设输出
这里
我们用
使用线性回归模型时,
可以看出这个成本函数是用来描述回归模型预测的结果
如果我们把训练序列用矩阵/向量的形式来表述的话,在描述成本函数时,我们可以省去加和符号
那么,成本函数则可以被表示为
下面我们给一个叫做normal equation的方法,来确定最佳参数向量
另一种同样比较常见的数值解法请参见我的另一篇博文,Gradient Descent Algorithm。
Derivation of the normal equations
Common method
Define the ith residual to be
Then
The derivatives are
Substitution of the expressions for the residuals and the derivatives into the gradient equations gives
Thus if
Upon rearrangement, we obtain the normal equations:
The normal equations are written in matrix notation as
where
The solution of the normal equations yields the vector
Derivation directly in terms of matrices
The normal equations can be derived directly from a matrix representation of the problem as follows. The objective is to minimize
Note that:
Differentiating this with respect to
which is equivalent to the above-given normal equations. A sufficient condition for satisfaction of the second-order conditions for a minimum is that
Derivation without calculus
When
can be written as
where
It follows that
and therefore minimized exactly when
- Linear regression
- linear regression
- linear regression
- linear regression
- Linear Regression
- linear regression
- linear regression
- linear regression
- linear regression
- Linear Regression
- Linear Regression
- Linear Regression
- linear-regression
- Linear regression
- Linear Regression
- Linear Regression
- Linear Regression
- Linear Regression Logistic Regression
- 关于Python机器学习
- Load sprites in XCode 7.3 Beta #15199
- 监控网络类型变化WIFI 3g
- 通过系统广播,获得apk的packageName以后,如何仅通过packageName获取其他信息
- 一个自定义的ActionSheet,可以自已轻松修改上面的东西
- Linear Regression
- MTK最新最全的智能机roadmap(珍藏版)
- 百科—最短路
- Android中Path类的lineTo方法和quadTo方法画线的区别
- Eclipse下修改工程名
- Fortran 当数组大小不一样时,会出现什么情况。
- iText初探之HelloWorld (一)
- Unity 5.4公開測試,免費用戶也能下載使用!
- android 选择图片后对图片压缩