版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
1、Linear Regression with multiple variables,Multiple features,Machine Learning,Multiple features (variables).,Multiple features (variables).,Multiple features (variables).,Notation: = number of features = input (features) of training example. = value of feature in training example.,Hypothesis:,Previou
2、sly:,For convenience of notation, define .,Multivariate linear regression.,Linear Regression with multiple variables,Gradient descent for multiple variables,Machine Learning,Hypothesis:,Cost function:,Parameters:,(simultaneously update ),Gradient Descent,Repeat,Previously (n=1):,New algorithm :,Repe
3、at,(simultaneously update for ),Linear Regression with multiple variables,Gradient descent in practice I: Feature Scaling,Machine Learning,E.g. = size (0-2000 feet2) = number of bedrooms (1-5),Feature Scaling Idea: Make sure features are on a similar scale.,size (feet2),number of bedrooms,Feature Sc
4、aling,Get every feature into approximately a range.,Replace with to make features have approximately zero mean (Do not apply to ).,Mean normalization,E.g.,Linear Regression with multiple variables,Gradient descent in practice II: Learning rate,Machine Learning,Gradient descent,“Debugging”: How to ma
5、ke sure gradient descent is working correctly.,How to choose learning rate .,Example automatic convergence test:,Declare convergence if decreases by less than in one iteration.,No. of iterations,Making sure gradient descent is working correctly.,Making sure gradient descent is working correctly.,Gra
6、dient descent not working. Use smaller .,No. of iterations,No. of iterations,No. of iterations,For sufficiently small , should decrease on every iteration. But if is too small, gradient descent can be slow to converge.,Summary:,If is too small: slow convergence. If is too large: may not decrease on
7、every iteration; may not converge.,To choose , try,Linear Regression with multiple variables,Features and polynomial regression,Machine Learning,Housing prices prediction,Polynomial regression,Price (y),Size (x),Choice of features,Price (y),Size (x),Linear Regression with multiple variables,Normal e
8、quation,Machine Learning,Gradient Descent,Normal equation: Method to solve for analytically.,Intuition: If 1D,Solve for,(for every ),Examples:,Examples:,examples ; features.,E.g. If,is inverse of matrix .,Octave:,pinv(X*X)*X*y,training examples, features.,Gradient Descent,Normal Equation,No need to
9、choose . Dont need to iterate.,Need to choose . Needs many iterations.,Works well even when is large.,Need to compute,Slow if is very large.,Linear Regression with multiple variables,Normal equation and non-invertibility (optional),Machine Learning,Normal equation,What if is non-invertible? (singular/ degenerate),Octave:,pinv(X*X)*X*y,What if is non-invertible
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 区域大学生就业指导中心建设
- 油库采购验收制度
- 流量采购管理制度
- 海南绿色政府采购制度
- 涉密安全采购管理制度
- 混凝土采购使用管理制度
- 湖北屏风采购制度
- 烘焙食品厂采购管理制度
- 煤焦油采购制度
- 牙医物资采购管理制度
- 2024年江苏泰州市金融控股集团有限公司招聘笔试参考题库含答案解析
- 大学新教师入职培训
- 工程管理中国铁塔LTE5G通信基站项目风险管理研究
- 法院申请冻结房产申请书
- 第5课+家族の写真+课件 【知识精讲精研】 初中日语七年级人教版第一册
- JJF 1951-2021 基于结构光扫描的光学三维测量系统校准规范 高清晰版
- 小学生心理健康教育方式的研究结题报告
- 山西省煤矿建设施工管理标准
- 220kV输电线路220kV间隔扩建工程施工组织设计(定稿)
- 四川省达州市教育专业能力测验教师招聘考试
- LY/T 2899-2017湿地生态系统服务评估规范
评论
0/150
提交评论