判别模型(discriminative model) 和 生成模型(generative model)

http://blog.sciencenet.cn/home.php?mod=space&uid=248173&do=blog&id=227964

http://www.gooseeker.com/cn/node/knowledgebase/discriminative_generative_model

Article 1

【摘要】
- 生成模型:无穷样本==》概率密度模型 = 产生模型==》预测
- 判别模型:有限样本==》判别函数 = 预测模型==》预测

【简介】
简单的说,假设o是观察值,q是模型。
如果对P(o|q)建模,就是Generative模型。其基本思想是首先建立样本的概率密度模型,再利用模型进行推理预测。要求已知样本无穷或尽可能的大限制。
这种方法一般建立在统计力学和bayes理论的基础之上。
如果对条件概率(后验概率) P(q|o)建模,就是Discrminative模型。基本思想是有限样本条件下建立判别函数,不考虑样本的产生模型,直接研究预测模型。代表性理论为统计学习理论。
这两种方法目前交叉较多。

【判别模型Discriminative Model】——inter-class probabilistic description

又可以称为条件模型,或条件概率模型。估计的是条件概率分布(conditional distribution), p(class|context)。
利用正负例和分类标签,focus在判别模型的边缘分布。目标函数直接对应于分类准确率。

- 主要特点:
寻找不同类别之间的最优分类面,反映的是异类数据之间的差异。
- 优点:
分类边界更灵活,比使用纯概率方法或生产模型得到的更高级。
能清晰的分辨出多类或某一类与其他类之间的差异特征
在聚类、viewpoint changes, partial occlusion and scale variations中的效果较好
适用于较多类别的识别
判别模型的性能比生成模型要简单,比较容易学习
- 缺点:
不能反映训练数据本身的特性。能力有限,可以告诉你的是1还是2,但没有办法把整个场景描述出来。
Lack elegance of generative: Priors, 结构, 不确定性
Alternative notions of penalty functions, regularization, 核函数
黑盒操作: 变量间的关系不清楚,不可视

- 常见的主要有:
logistic regression
SVMs
traditional neural networks
Nearest neighbor
Conditional random fields(CRF): 目前最新提出的热门模型,从NLP领域产生的,正在向ASR和CV上发展。

- 主要应用:
Image and document classification
Biosequence analysis
Time series prediction

【生成模型Generative Model】——intra-class probabilistic description

又叫产生式模型。估计的是联合概率分布(joint probability distribution),p(class, context)=p(class|context)*p(context)。

用于随机生成的观察值建模,特别是在给定某些隐藏参数情况下。在机器学习中,或用于直接对数据建模(用概率密度函数对观察到的draw建模),或作为生成条件概率密度函数的中间步骤。通过使用贝叶斯rule可以从生成模型中得到条件分布。

如果观察到的数据是完全由生成模型所生成的,那么就可以fitting生成模型的参数,从而仅可能的增加数据相似度。但数据很少能由生成模型完全得到,所以比较准确的方式是直接对条件密度函数建模,即使用分类或回归分析。

与描述模型的不同是,描述模型中所有变量都是直接测量得到。

- 主要特点:
一般主要是对后验概率建模,从统计的角度表示数据的分布情况,能够反映同类数据本身的相似度。
只关注自己的inclass本身(即点左下角区域内的概率),不关心到底 decision boundary在哪。
- 优点:
实际上带的信息要比判别模型丰富,
研究单类问题比判别模型灵活性强
模型可以通过增量学习得到
能用于数据不完整(missing data)情况
modular construction of composed solutions to complex problems
prior knowledge can be easily taken into account
robust to partial occlusion and viewpoint changes
can tolerate significant intra-class variation of object appearance
- 缺点:
tend to produce a significant number of false positives. This is particularly true for object classes which share a high visual similarity such as horses and cows
学习和计算过程比较复杂

- 常见的主要有:
Gaussians, Naive Bayes, Mixtures of multinomials
Mixtures of Gaussians, Mixtures of experts, HMMs
Sigmoidal belief networks, Bayesian networks
Markov random fields

所列举的Generative model也可以用disriminative方法来训练,比如GMM或HMM,训练的方法有EBW(Extended Baum Welch),或最近Fei Sha提出的Large Margin方法。

- 主要应用:
NLP:
Traditional rule-based or Boolean logic systems (Dialog and Lexis-Nexis) are giving way to statistical approaches (Markov models and stochastic context grammars)
Medical Diagnosis:
QMR knowledge base, initially a heuristic expert systems for reasoning about diseases and symptoms been augmented with decision theoretic formulation Genomics and Bioinformatics
Sequences represented as generative HMMs

【两者之间的关系】
由生成模型可以得到判别模型,但由判别模型得不到生成模型。
Can performance of SVMs be combined elegantly with flexible Bayesian statistics?
Maximum Entropy Discrimination marries both methods: Solve over a distribution of parameters (a distribution over solutions)

Article 2

Let's say you have input data x and you want to classify the data into labels y. A generative model learns the joint probability distribution p(x,y) and a discriminative model learns the conditional probability distribution p(y|x) - which you should read as 'the probability of y given x'.

Here's a really simple example. Suppose you have the following data in the form (x,y):

       (1,0), (1,0), (2,0), (2, 1)

p(x,y) is

             y=0   y=1
            -----------
       x=1 | 1/2   0
       x=2 | 1/4   1/4

p(y|x) is

             y=0   y=1
            -----------
       x=1 | 1     0
       x=2 | 1/2   1/2

If you take a few minutes to stare at those two matrices, you will understand the difference between the two probability distributions.

The distribution p(y|x) is the natural distribution for classifying a given example x into a class y, which is why algorithms that model this directly are called discriminative algorithms. Generative algorithms model p(x,y), which can be tranformed into p(y|x) by applying Bayes rule and then used for classification. However, the distribution p(x,y) can also be used for other purposes. For example you could use p(x,y) to generate likely (x,y) pairs.

From the description above you might be thinking that generative models are more generally useful and therefore better, but it's not as simple as that. This paper is a very popular reference on the subject of discriminative vs. generative classifiers, but it's pretty heavy going. The overall gist is that discriminative models generally outperform generative models in classification tasks.

另一个解释,摘录如下:

  • 判别模型Discriminative Model,又可以称为条件模型,或条件概率模型。估计的是条件概率分布(conditional distribution), p(class|context)。
  • 生成模型Generative Model,又叫产生式模型。估计的是联合概率分布(joint probability distribution),p(class, context)=p(class|context)*p(context)。
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值