2-1 2-2 2-3 2-4 2-5 2-6 2-7: Model regression and Cost function
来源:互联网 发布:linux下cp命令 编辑:程序博客网 时间:2024/05/19 03:28
例:housing Price
监督学习:给出正确的答案
回归问题:预测出正确的结果
训练回归模型:
training set——算法——hypothesis
Cost:
目标函数——代价函数(平方误差代价函数——大多数回归问题):去最小化或最大化代价函数
问题设定:
图示:
1图
2图
3图
4图
算法利用程序去自动寻找“碗底”,使得损失函数J最小
随着参数增多,维度增大,图形无法表示。
学习率:即参数变化的速度
how?——Gradient Descent——have J, want min J——可以用来最小化任何loss function
①设置各参数初始值;
②对各参数求偏导数;
③给定学习率,即参数值进行变化的步伐大小 Learning rate
④参数进行梯度下降(给定同一学习率,各参数梯度下降是同时进行的,同时更新参数)
⑤直到收敛,梯度下降结束
图解:
说明:
Learning rate:
太小:慢;太大:overshoot 碗底。
越接近碗底,虽然LR固定,但越来越慢,步伐越小,因为梯度在变小。
局部最优解问题:存在多个碗底,一般来说,致力于构造一个convex function(bowl function),即只有全局最优解的问题
Finally——Combined
# Batch Gradient Descent
梯度下降的每一步都会使用全部的训练样本。
阅读全文
0 0
- 2-1 2-2 2-3 2-4 2-5 2-6 2-7: Model regression and Cost function
- Andrew NG 《machine learning》week 2,class5 —Model and Cost Function
- 2 - 2 - Cost Function (8 min)
- 2 - 4 - Cost Function - Intuition II (9 min)
- 2 - 3 - Cost Function - Intuition I (11 min)
- Stock overview and cost assignment - 2
- ML 中Cost function为什么要除以2
- Stanford机器学习课程(Andrew Ng) Week 1 Model and Cost Function --- 第二节 Cost Function
- Model 1和Model 2
- Exercise 2: Linear Regression
- Exercise 2: Linear Regression
- Linear Regression总结2
- Machine Learning----Regression(2)
- logistic regression(2)
- 网易公开课讲义2 Classification and logistic regression 笔记
- 学习笔记2 Supervised Learning and Optimization 之 Softmax Regression
- 树回归CART(Classification And Regression Tree)(2)
- Stanford机器学习课程(Andrew Ng) Week 1 Model and Cost Function --- 第一节 Model representation
- web安全:通俗易懂,以实例讲述破解网站的原理及如何进行防护!如何让网站变得更安全。
- 并查集模板(找老大函数)
- get与post的区别
- 被误解的 MVC 和被神化的 MVVM
- 机器学习之决策树算法python实现
- 2-1 2-2 2-3 2-4 2-5 2-6 2-7: Model regression and Cost function
- 环境变量配置
- activiti学习--08 连线
- OJ 2597: 编程题B-选拔飞行员
- ubuntu16.04.3配置freeswitch1.6使用PostgreSQL
- 【预习笔记】读几个Java集合类源代码—ArrayList
- python异常处理
- 用ipython的好处
- Ubuntu 搭建VPN(PPTP)并开机自启