机器学习笔记-1 Linear Regression(week 1)
1.Linear Regression with One variable
Linear Regression is supervised learning algorithm, Because the data set is given a right answer for each example.
And we are predicting real-valued output so it is a regression problem.
Block Diagram:


2. Cost Function
Idea: choose Θ0 and Θ1 so that h(x) is close to y for our training example
cost function:
(it a bow-shaped function )
So it became a mathematical problem of minimizing the cost function (Squared error funciton)
3. Gradient Descent
we are using gradient descent to minimize the cost function
Process:
1. Start with some random choice of the theta vector
2. Keep changing the theta vector to reduce J(theta) Until we end up at a minimum
Repeat until convergence:
(the derivative term is the slope of the cost function)
alpha is the learning rate And we need to a aimultaneous update for the theta vector.
1. If alpha is too small, the gradient descent is small
2. If alpha is too larger, gradient descent, it will overshoot the minimum, it may fail to converge.
And taking the derivative, we can get:

Convex function: a bow-shaped function just like the cost function J(theta)
Batch gradient descent: each step of gradient descent uses all the training examples(sum over all the training sample)
机器学习笔记-1 Linear Regression(week 1)的更多相关文章
- 机器学习笔记1——Linear Regression with One Variable
Linear Regression with One Variable Model Representation Recall that in *regression problems*, we ar ...
- 机器学习笔记-1 Linear Regression with Multiple Variables(week 2)
1. Multiple Features note:X0 is equal to 1 2. Feature Scaling Idea: make sure features are on a simi ...
- 斯坦福机器学习视频笔记 Week1 Linear Regression and Gradient Descent
最近开始学习Coursera上的斯坦福机器学习视频,我是刚刚接触机器学习,对此比较感兴趣:准备将我的学习笔记写下来, 作为我每天学习的签到吧,也希望和各位朋友交流学习. 这一系列的博客,我会不定期的更 ...
- Coursera台大机器学习课程笔记8 -- Linear Regression
之前一直在讲机器为什么能够学习,从这节课开始讲一些基本的机器学习算法,也就是机器如何学习. 这节课讲的是线性回归,从使Ein最小化出发来,介绍了 Hat Matrix,要理解其中的几何意义.最后对比了 ...
- Stanford机器学习---第一讲. Linear Regression with one variable
原文:http://blog.csdn.net/abcjennifer/article/details/7691571 本栏目(Machine learning)包括单参数的线性回归.多参数的线性回归 ...
- Machine Learning 学习笔记2 - linear regression with one variable(单变量线性回归)
一.Model representation(模型表示) 1.1 训练集 由训练样例(training example)组成的集合就是训练集(training set), 如下图所示, 其中(x,y) ...
- Andrew Ng机器学习编程作业: Linear Regression
编程作业有两个文件 1.machine-learning-live-scripts(此为脚本文件方便作业) 2.machine-learning-ex1(此为作业文件) 将这两个文件解压拖入matla ...
- Andrew Ng机器学习 一: Linear Regression
一:单变量线性回归(Linear regression with one variable) 背景:在某城市开办饭馆,我们有这样的数据集ex1data1.txt,第一列代表某个城市的人口,第二列代表在 ...
- 李宏毅机器学习笔记1:Regression、Error
李宏毅老师的机器学习课程和吴恩达老师的机器学习课程都是都是ML和DL非常好的入门资料,在YouTube.网易云课堂.B站都能观看到相应的课程视频,接下来这一系列的博客我都将记录老师上课的笔记以及自己对 ...
随机推荐
- 字符集&各种编码&编码解码
要理解乱码问题,首先需要理解几个概念:字符集.编码.编码规则.乱码 1. 字符集: 字符(Character)是各种文字和符号的总称,包括各国家文字.标点符号.图形符号.数字等.字符集(Charact ...
- Java引领新生活
阅读邹欣老师的博客,谈谈你期望的师生关系是什么样的? 我觉得师生关系应当是亲密无间,课上老师讲解学生配合,课下师生交流启发思考. 你有什么技能(学习,棋类,球类,乐器,艺术,游戏,......)比大多 ...
- Asp.net web api 知多少
本系列主要翻译自<ASP.NET MVC Interview Questions and Answers >- By Shailendra Chauhan,想看英文原版的可访问http:/ ...
- 受限玻尔兹曼机(RBM)原理总结
在前面我们讲到了深度学习的两类神经网络模型的原理,第一类是前向的神经网络,即DNN和CNN.第二类是有反馈的神经网络,即RNN和LSTM.今天我们就总结下深度学习里的第三类神经网络模型:玻尔兹曼机.主 ...
- 安装IPython攻略
由于对python自带的idle不太满意,看到有介绍说ipython不错,于是想装一个试试. 机器上该装的扩展包都已经装好了,比如setuptools,matplotlib,环境变量配置,所以安装起来 ...
- 运用google-protobuf的IM消息应用开发(前端篇)
前言: 公司原本使用了第三方提供的IM消息系统,随着业务发展需要,三方的服务有限,并且出现问题也很难处理和排查,所以这次新版本迭代,我们的server同事呕心沥血做了一个新的IM消息系统,我们也因此配 ...
- js两个判断&&的值与||的值
var value1="val1"; var value2="val2"; alert(value1&&value2); //结果为val ...
- JDK动态代理实现机制
=========================================== 原文链接: JDK动态代理实现机制 转载请注明出处! =========================== ...
- 【Egret】web版本报错:XMLHttpRequest cannot load
[Egret] web发行版本报错:XMLHttpRequest cannot load file:///C:/Users/PX/Documents/EgretProjects/Xt1/resourc ...
- Appium和Robotium在文字输入上的区别
Appium和Robotium在文字输入上的区别 Appium和Robotium在对文本框进行输入时有一定的区别: Appium在输入文字时需要调用系统键盘 Robotium在输入文字是根本不需要 ...