【转载】Discriminative Learning和Generative Learning

Discriminative Learning和Generative Learning

2011-12-08 10:47 1929人阅读 评论(2) 收藏 举报

variablesdependencies算法includeparametersexpress

Discriminative 学习算法是一类模型化输入(X)输出(Y)的关系的方法,简单来说就好比中医,我们只知道用若干个药(当归,虎骨。。。)可以凑成一个药方,就能治疗跌打病痛。但我们并不去了解内部的原因,我们将其看做一个黑盒,只需了解X和Y的关系,即model P(Y|X).学习的结果就是X的一组参数,好比当归2钱,虎骨1两。Discriminative Learning要求X的各个项是独立变化的。

Generative学习算法不直接model P(Y|X),因为这可能非常复杂,例如model 在give 一个X=吸烟的人,Y得肺癌的几率。而是model P(X|Y),就好像在得肺癌的人里面看吸烟人的情况。我们都知道吸烟的人数亿亿计,但得肺癌的人逼近是少数,model 从得肺癌的人出发,更加容易,比如10万个得肺癌的,抽样1000个就差不多了。

Generative的算法需要考察X的每个项的概率分布情况,即P(Y|{x1,x2,x3...xn}),需要考察P(x1|Y)...P(xn|Y)...

一句话,直接model P(Y|X)的算法就是Discriminative Learning,model P(X|Y)和 P(Y)然后间接的model P(Y|X)的就是 Generative Learning。

以下来自维基百科

http://en.wikipedia.org/wiki/Discriminative_model

Discriminative model

From Wikipedia, the free encyclopedia

Discriminative models are a class of models used in machine learning for modeling the dependence of an unobserved variable y on an observed variable x. Within a statistical framework, this is done by modeling the conditional probability distribution P(y | x), which can be used for predicting y from x.

Discriminative models differ from generative models in that they do not allow one to generate samples from the joint distribution of x and y. However, for tasks such as classification and regression that do not require the joint distribution, discriminative models generally yield superior performance. On the other hand, generative models are typically more flexible than discriminative models in expressing dependencies in complex learning tasks. In addition, most discriminative models are inherently supervised and cannot easily be extended to unsupervised learning.

Examples of discriminative models used in machine learning include:

Generative model

From Wikipedia, the free encyclopedia

In probability and statistics, a generative model is a model for randomly generating observable data, typically given some hidden parameters. It specifies a joint probability distribution over observation and label sequences. Generative models are used in machine learning for either modeling data directly (i.e., modeling observed draws from a probability density function), or as an intermediate step to forming aconditional probability density function. A conditional distribution can be formed from a generative model through the use of Bayes‘ rule.

Shannon (1948) gives an example in which a table of frequencies of English word pairs is used to generate a sentence beginning with "representing and speedily is an good"; which is not proper English but which will increasingly approximate it as the table is moved from word pairs to word triplets etc.

Generative models contrast with discriminative models, in that a generative model is a full probabilistic model of all variables, whereas a discriminative model provides a model only for the target variable(s) conditional on the observed variables. Thus a generative model can be used, for example, to simulate (i.e. generate) values of any variable in the model, whereas a discriminative model allows only sampling of the target variables conditional on the observed quantities. On the other hand, despite the fact that discriminative models do not need to model the distribution of the observed variables, they cannot generally express more complex relationships between the observed and target variables. They don‘t necessarily perform better than generative models at classification and regression tasks.

Examples of generative models include:

If the observed data are truly sampled from the generative model, then fitting the parameters of the generative model to maximize the data likelihood is a common method. However, since most statistical models are only approximations to the true distribution, if the model‘s application is to infer about a subset of variables conditional on known values of others, then it can be argued that the approximation makes more assumptions than are necessary to solve the problem at hand. In such cases, it is often more accurate to model the conditional density functions directly, using a discriminative model (see above).

时间: 2024-10-09 22:01:10

【转载】Discriminative Learning和Generative Learning的相关文章

生成学习算法(Generative Learning algorithms)

一:引言 在前面我们谈论到的算法都是在给定x的情况下直接对p(y|x;Θ)进行建模.例如,逻辑回归利用hθ(x) = g(θTx)对p(y|x;Θ)建模. 现在考虑这样一个分类问题,我们想根据一些特征来区别动物是大象(y=1)还是狗(y=0).给定了这样一个训练集,逻辑回归或感知机算法要做的就是去找到一个决策边界,将大象和狗的样本分开来.但是如果换个思路,首先根据大象的特征来学习出一个大象的模型,然后根据狗的特征学习出狗的模型,最后对于一个新的样本,提取它的特征先放到大象的模型中求得是大象的概率

Generative learning algorithm

本讲大纲: 1.生成学习算法(Generative learning algorithm) 2.高斯判别分析(GDA,Gaussian Discriminant Analysis) 3.朴素贝叶斯(Naive Bayes) 4.拉普拉斯平滑(Laplace smoothing) 1.生成学习算法 判别学习算法(discriminative learning algorithm):直接学习p(y|x)(比如说logistic回归)或者说是从输入直接映射到{0,1}. 生成学习算法(generati

机器学习 第六讲:Generative Learning Algorithm (B)

Naive Bayes 在GDA模型中,特征向量x是连续的实数向量,在这一讲里,我们将要讨论另外一种算法用来处理特征向量x是离散值的情况. 我们先考虑一个例子,用机器学习的方法建立一个垃圾邮件过滤器,我们希望用一种算法来甄别邮件的信息以确定该邮件是不是垃圾邮件,通过学习这个算法,我们将能建立自己的垃圾邮件过滤器帮我们对邮件进行分类,邮件分类只是一系列我们称之为文本分类中的一种. 首先假设我们有一个训练集(包括了垃圾邮件和正常的邮件),我们用特征向量x表示一封邮件,特征向量的长度等于该邮件所含有的

分类和逻辑回归(Classification and logistic regression),广义线性模型(Generalized Linear Models) ,生成学习算法(Generative Learning algorithms)

分类和逻辑回归(Classification and logistic regression) http://www.cnblogs.com/czdbest/p/5768467.html 广义线性模型(Generalized Linear Models) http://www.cnblogs.com/czdbest/p/5769326.html 生成学习算法(Generative Learning algorithms) http://www.cnblogs.com/czdbest/p/5771

paper 124:【转载】无监督特征学习——Unsupervised feature learning and deep learning

来源:http://blog.csdn.net/abcjennifer/article/details/7804962 无监督学习近年来很热,先后应用于computer vision, audio classification和 NLP等问题,通过机器进行无监督学习feature得到的结果,其accuracy大多明显优于其他方法进行training.本文将主要针对Andrew的unsupervised learning,结合他的视频:unsupervised feature learning b

【转载】 无监督特征学习——Unsupervised feature learning and deep learning

无监督特征学习——Unsupervised feature learning and deep learning 分类: Compression Computer Vision Machine Learning 杂感2012-07-31 15:48 36848人阅读 评论(61) 收藏 举报 目录(?)[+] 无监督学习近年来很热,先后应用于computer vision, audio classification和 NLP等问题,通过机器进行无监督学习feature得到的结果,其accurac

转:无监督特征学习——Unsupervised feature learning and deep learning

http://blog.csdn.net/abcjennifer/article/details/7804962 无监督学习近年来很热,先后应用于computer vision, audio classification和 NLP等问题,通过机器进行无监督学习feature得到的结果,其accuracy大多明显优于其他方法进行training.本文将主要针对Andrew的unsupervised learning,结合他的视频:unsupervised feature learning by A

(转)Predictive learning vs. representation learning 预测学习 与 表示学习

Predictive learning vs. representation learning  预测学习 与 表示学习 When you take a machine learning class, there's a good chance it's divided into a unit on supervised learning and a unit on unsupervised learning. We certainly care about this distinction f

【转帖】UFLDL Tutorial(the main ideas of Unsupervised Feature Learning and Deep Learning)

UFLDL Tutorial From Ufldl Jump to: navigation, search Description: This tutorial will teach you the main ideas of Unsupervised Feature Learning and Deep Learning.  By working through it, you will also get to implement several feature learning/deep le