• Normal equation: 一种用来linear regression问题的求解Θ的方法,另一种可以是gradient descent
  • 仅适用于linear regression问题的求解,对其它的问题如classification problem或者feature number太大的情况下(计算量会很大)则不能使用normal equation,而应使用gradient descent来求解。

(由求导的过程推导而得)

这种方法是对cost function(J(θ),θ为n+1维向量(θ0,θ1.....θn))对各个θ求偏导,令偏导为0,这样求出对应的θ(高等数学里面求极值的方法),这         样求出的θ,使cost function的值最小

例如:  

如何求解θ    

  • 这种求解θ的方法可不进行feature scaling,而对于用gradient descent求解θ而言,feature scaling很重要,它可使收敛速度加快。
  • normal equation与gradient descent两种方法优点与缺点比较

  • 当n>10000时,即feature number>10000时,用normal equation消耗太大,这时倾向于使用gradient desccent或者其它算法
  • 当n<1000时,使用normal equation更方便

machine learning (7)---normal equation相对于gradient descent而言求解linear regression问题的另一种方式的更多相关文章

  1. machine learning 笔记 normal equation

    theta=(Xt*X)^-1 Xt*y x is feature matrix y is expectation

  2. (转)Introduction to Gradient Descent Algorithm (along with variants) in Machine Learning

    Introduction Optimization is always the ultimate goal whether you are dealing with a real life probl ...

  3. 【转】Derivation of the Normal Equation for linear regression

    I was going through the Coursera "Machine Learning" course, and in the section on multivar ...

  4. Coursera, Machine Learning, notes

      Basic theory (i) Supervised learning (parametric/non-parametric algorithms, support vector machine ...

  5. Machine Learning - week 2 - Multivariate Linear Regression

    Multiple Features 上一章中,hθ(x) = θ0 + θ1x,表示只有一个 feature.现在,有多个 features,所以 hθ(x) = θ0 + θ1x1 + θ2x2 + ...

  6. [C2P2] Andrew Ng - Machine Learning

    ##Linear Regression with One Variable Linear regression predicts a real-valued output based on an in ...

  7. [C2P3] Andrew Ng - Machine Learning

    ##Advice for Applying Machine Learning Applying machine learning in practice is not always straightf ...

  8. 机器学习入门:Linear Regression与Normal Equation -2017年8月23日22:11:50

    本文会讲到: (1)另一种线性回归方法:Normal Equation: (2)Gradient Descent与Normal Equation的优缺点:   前面我们通过Gradient Desce ...

  9. Machine Learning - 第3周(Logistic Regression、Regularization)

    Logistic regression is a method for classifying data into discrete outcomes. For example, we might u ...

随机推荐

  1. mysql查看和修改最大连接数

    查看最大连接数 SHOW VARIABLES LIKE '%max_connections%'; 修改最大连接数 ;

  2. 移动测(APP)试与web端测试的区别

    1.操作环境不同 移动端的测试环境是安卓操作环境或者iOS操作系统: web端操作环境一般是windows(如果你用的是MC电脑,那就是iOS操作系统). 2.页面的显示尺寸不同 移动端的尺寸比较多, ...

  3. java File源码理解,探索File路径

    1.方法: new File(path); 我们知道根据输入的路径path的不同 ,File可以根据path的不同格式,来访问文件.那么,path的形式有几种呢? 根据源码 可以知道,输入的路径pat ...

  4. centos发布 7.7.1908版本了,怎么把老版本更新到新版本了?

    CENTOS升级 7.6 升级到7.7.1908 0.查看目前版本 cat /etc/issue cat /etc/redhat-release 1.下载系统镜像文件 https://www.cent ...

  5. 计算GPA

    #include <stdio.h> int main() { int n,t,i; float sum,s,p,m,k; while(~scanf("%d",& ...

  6. 【题解】Luogu P4910 帕秋莉的手环

    原题传送门 "连续的两个中至少有1个金的"珂以理解为"不能有两个木相连" 我们考虑一个一个将元素加入手环 设f\([i][0/1]\)表示长度为\(i\)手环末 ...

  7. Ubuntu 18.04 Server 配置静态ip

    刚在虚拟机里面状态了一个 Ubunut 18.04 Server 作为我的服务器,我习惯使用静态ip首先再virtualbox中设置虚拟机网络的连接方式为桥接模式进入ubuntu虚拟机根据我的印象直接 ...

  8. MES系统之设备管理的基础功能

    设备是制造企业进行生产的主要物质技术基础,制造企业的生产率.产品质量.生产成本都与设备直接相关.因此,正确使用.定时保养.及时检修维护设备,并对设备的运行性能进行分析,使设备处于良好的状态,才能保证企 ...

  9. [jsp学习笔记] jsp过滤器

  10. 线程池ThreadPool实战

    线程池ThreadPool 线程池概念 常用线程池和方法 1.测试线程类 2.newFixedThreadPool固定线程池 3.newSingleThreadExecutor单线程池 4.newCa ...