【04】standford L04
来源:互联网 发布:咫尺网络官网电脑端 编辑:程序博客网 时间:2024/05/22 16:23
L4 其他解法-牛顿方法-指数家族-GLM
1、Logistic Regression——Newton’s method
2、指数家族Exponential Family
3、广义线性模型 Generalized Linear Models
1Logistic Regression——Newton’s method
进一步了解Newton’s Method
P(y|x;θ)
- y是实数时;用高斯分布——LMS(线性回归)
- y={0,1}二元分类,(0-1)分布,用Logistic Regression!那为什么要使用sigmoid函数呢??
来看下面的【Generalized Linear Models (GLMs)】【Exponential Family】
2 【prepare】指数家族Exponential Family
Form
参数
η —— the natural parameter (thecanonical parameter);
T(y) —— the sufficient statistic(对于这里的分布,一般T(y)=y);
a(η) —— the log partition function(The quantity e^a(η) essentially plays the role of a nor-malization constant, that makes sure the distribution p(y;η) sums/integrates over y to 1)
0-1分布与高斯分布、
0-1分布(Bernoulli Distribution)
- p(y= 1;φ) =φ;
- p(y= 0;φ) = 1−φ.
- As we varying φ, we obtain Bernoulli distributions with different means.(不同的φ,会使得分布的均值不一样,因为0-1分布的均值就是mean = φ)
【0-1分布(Bernoulli Distribution)】化为指数家族的形式:高斯分布
其他分布
还有其他分布也属于指数家族(exponential family),如下:
- The multinomial 多项式分布(which we’ll see later)
- the Poisson 泊松分布(for modelling count-data; also see the problem set);
- the gamma and the exponential (for modelling continuous, non-negative random variables, such as time-intervals);
- the beta and the Dirichlet (for distributions over probabilities)
所以还要探讨更一般的形式(GLM),来构建模型,在模型中 y 来自于不同的这些不同分布。
3 Constructing GLMs
用更一般的方法GLM来解决我们在实际中遇到的问题!NICE
3.1 前提假设
1、总体服从的分布隶属于指数家族分布
2、Hypothesis h(θ)为分布的均值
3、自然参数η和输入变量x是线性相关的
3.2 Ordinary Least Squares 最小二乘法
高斯分布-属于指数家族
对于上面的why,因为在之前的讲解中提到,误差的分布大多服从正态分布,所以这里用的是高斯分布。
3.3 Logistic Regression 逻辑回归
0-1分布(伯努利分布)属于指数家族,均值也容易知道,那么推导也很简单
3.4 Softmax Regression
多分类问题,用多项式分布
【定义】
【推演】
【参数 fitting】
总结
1、新的计算参数θ的方法-Newton’s method
2、线性回归、逻辑回归的Hypothesis是怎么来的
- 指数家族
- 一般线性模型(GLM)
致谢
谢谢Andrew老师精彩的视频与讲义。
Jeremy Zhang
2014.12.31
0 0
- 【04】standford L04
- Python入门:老男孩python第四天(L04-04-03-python异常处理02)练习题纠正
- standford自然语言处理---introduciton
- Standford parser举例
- standford 编程方法 未解决问题
- Standford cs106B Assignment #6 Priority Queue
- standford open course iOS7 develop Lecture10
- Standford《Machine Learning》 编程练习2
- 【01】 机器学习(Standford)笔记01
- 【02】 机器学习(Standford)笔记 L02
- 【03】 机器学习(Standford)笔记 L03
- standford iOS7 公开课笔记目录树
- standford iOS7 公开课笔记目录树
- standford NLP课程笔记一 正则表达式
- standford NLP课程笔记二 分词
- standford NLP课程笔记三 句子切分
- standford NLP课程笔记四 编辑距离
- standford NLP课程笔记无 语言模型
- 安全考试
- 日经社説 20141231 法人税の改革をさらに前進させよ
- 企业级Hadoop 2.x入门系列之五Hadoop2.2 伪分布式安装
- 前端开发规范之jQuery编码规范
- 社説 20141231 性犯罪の罰則 深刻な被害に見合う法改正を
- 【04】standford L04
- Erlang R16+ Crypto模块与最新Openssl不兼容问题
- 扫描仪分辨率详解
- 社説 20141231 与党税制大綱 経済再生へ着実に改革進めよ
- RadioButton 代码设置位置
- 黑马程序员--Oracle学习_day02
- MSSQL数据库中用户表使用情况
- UICollectionView 数据不够一屏 开启 上下滚动
- quartz在集群环境下的最终解决方案