• 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. LeetCode 82. 删除排序链表中的重复元素 II(Remove Duplicates from Sorted List II)

    82. 删除排序链表中的重复元素 II 82. Remove Duplicates from Sorted List II 题目描述 给定一个排序链表,删除所有含有重复数字的节点,只保留原始链表中没有 ...

  2. 为什么Redis单线程却能支撑高并发?

    作者:Draveness 原文链接:draveness.me/redis-io-multiplexing 最近在看 UNIX 网络编程并研究了一下 Redis 的实现,感觉 Redis 的源代码十分适 ...

  3. python 之 前端开发( jQuery事件、动画效果、.each()、 .data())

    11.58 事件 11.581 事件绑定方法与解绑 绑定事件: // 绑定方式一: $('.box1').click(function () { alert('绑定方式一') }); ​ // 绑定方 ...

  4. Windows的socket编程

    ################服务端 1.准备工作导入头文件 #include<WinSock2.h> #pragma comment(lib, "ws2_32.lib&quo ...

  5. xorm -Exist方法实例

    判断某个记录是否存在可以使用Exist, 相比Get,Exist性能更好. package main import ( "fmt" _ "github.com/go-sq ...

  6. 中国大学MOOC-翁恺-C语言程序设计习题集(二)

    04-0. 求符合给定条件的整数集(15)给定不超过6的正整数A,考虑从A开始的连续4个数字.请输出所有由它们组成的无重复数字的3位数. 输入格式: 输入在一行中给出A. 输出格式: 输出满足条件的的 ...

  7. exit status 1

  8. 牛客挑战赛33 B-鸽天的放鸽序列

    也许更好的阅读体验 \(\mathcal{Description}\) 定义一个长为\(n\)的\(01\)序列\(A_1, A_2, \dots, A_n\)​的权值为\(\sum_{i=1}^n ...

  9. Harbor仓库配置https访问

    注:高版本(14以上)docker执行login命令,默认使用https,且harbor必须使用域名,只是用ip访问是不行的. 假设使用的网址是:www.harbor.mobi,本机ip是192.16 ...

  10. C# winform导出数据弹出可修改目录及文件名的窗口

    string localFilePath = "", fileNameExt = "", newFileName = "", FilePat ...