1. 程式人生 > >判別式與生成式模型的區別

判別式與生成式模型的區別

判別式模型與生成式模型的區別

產生式模型(Generative Model)與判別式模型(Discrimitive Model)是分類器常遇到的概念,它們的區別在於:

對於輸入x,類別標籤y:
產生式模型估計它們的聯合概率分佈P(x,y)
判別式模型估計條件概率分佈P(y|x)

產生式模型可以根據貝葉斯公式得到判別式模型,但反過來不行。

Andrew Ng在NIPS2001年有一篇專門比較判別模型和產生式模型的文章:

On Discrimitive vs. Generative classifiers: A comparision of logistic regression and naive Bayes

判別式模型常見的主要有:

    Logistic Regression

    SVM

    Traditional Neural Networks

    Nearest Neighbor

    CRF

    Linear Discriminant Analysis

    Boosting

    Linear Regression


產生式模型常見的主要有:

       Gaussians

       Naive Bayes

       Mixtures of Multinomials

       Mixtures of Gaussians

       Mixtures of Experts

       HMMs

    Sigmoidal Belief Networks, Bayesian Networks

    Markov Random Fields

    Latent Dirichlet Allocation

一個通俗易懂的解釋

  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.

兩個模型的對比

參考資料:

http://bbs.sciencenet.cn/blog-484653-442300.html

http://www.leexiang.com/discriminative-model-and-generative-model

http://blog.163.com/[email protected]/blog/static/1718619832011227757554/

相關推薦

判別式生成模型區別

判別式模型與生成式模型的區別 產生式模型(Generative Model)與判別式模型(Discrimitive Model)是分類器常遇到的概念,它們的區別在於: 對於輸入x,類別標籤y: 產生式模型估計它們的聯合概率分佈P(x,y) 判別式模型估計條件概率分佈P(y|x) 產生式模型可以根據貝葉

機器學習--判別式模型生成模型

一、引言   本材料參考Andrew Ng大神的機器學習課程 http://cs229.stanford.edu   在上一篇有監督學習迴歸模型中,我們利用訓練集直接對條件概率p(y|x;θ)建模,例如logistic迴歸就利用hθ(x) = g(θTx)對p(y|x;θ)建模(其中g(z)是sigmoi

判別式模型生成模型(二)

一、引言   本材料參考Andrew Ng大神的機器學習課程 http://cs229.stanford.edu   在上一篇有監督學習迴歸模型中,我們利用訓練集直接對條件概率p(y|x;θ)建模,例如logistic迴歸就利用hθ(x) = g(θTx)對p(y|x;θ)建模(其中g(z)是sigmoid

機器學習_生成模型判別式模型

從概率分佈的角度看待模型。 給個例子感覺一下: 如果我想知道一個人A說的是哪個國家的語言,我應該怎麼辦呢? 生成式模型 我把每個國家的語言都學一遍,這樣我就能很容易知道A說的是哪國語言,並且C、D說的是哪國的我也可以知道,進一步我還能自己講不同國家語言。

機器學習小問題 -- 生成模型判別式模型

本篇博文總結最近學習到的生成式模型與判別式模型的知識。 1. 簡介 就像之前在總結分類和聚類時說的一樣,機器學習基本在做的事情就是在分類、打標籤,我們的模型也就像一個個分類機器(個人看法,歡迎指正)。而這麼多的模型,可以分為兩類:生成式模型與判別式模型。 對於一個分類器

常見生成模型判別式模型

col 情況 玻爾茲曼機 ron location 表示 受限玻爾茲曼機 貝葉斯 馬爾科夫 生成式模型 P(X,Y)對聯合概率進行建模,從統計的角度表示數據的分布情況,刻畫數據是如何生成的,收斂速度快。 • 1. 判別式分析 • 2. 樸素貝葉斯Nati

【模式識別機器學習】——判別式和產生模型

(1)判別式模型(Discriminative Model)是直接對條件概率p(y|x;θ)建模。常見的判別式模型有線性迴歸模型、線性判別分析、支援向量機SVM、神經網路、boosting、條件隨機場等。   舉例:要確定一個羊是山羊還是綿羊,用判別模型的方法是從歷史資料中學習到模型,然後通過提取這隻羊的特

機器學習之判別式模型生成模型

https://www.cnblogs.com/nolonely/p/6435213.html   判別式模型(Discriminative Model)是直接對條件概率p(y|x;θ)建模。常見的判別式模型有線性迴歸模型、線性判別分析、支援向量機SVM、神經網路、boosting

BAT面試題9:談談判別式模型生成模型

BAT面試題9:談談判別式模型和生成式模型? https://mp.weixin.qq.com/s/X7zWJCMN7gbCwqskIIpLcw 判別方法:由資料直接學習決策函式 Y = f(X),或者由條件分佈概率 P(Y|X)作為預測模型,即判別模型。 生成

判別式模型 vs. 生成模型

1. 簡介   生成式模型(generative model)會對\(x\)和\(y\)的聯合分佈\(p(x,y)\)進行建模,然後通過貝葉斯公式來求得\(p(y|x)\), 最後選取使得\(p(y|x)\)最大的\(y_i\). 具體地, \(y_{*}=arg \max_{y_i}p(y_i|x)=ar

什麼是判別式模型生成模型

判別式模型(Discriminative Model):直接對條件概率p(y|x)進行建模,常見判別模型有:線性迴歸、決策樹、支援向量機SVM、k近鄰、神經網路等;生成式模型(Generative Model):對聯合分佈概率p(x,y)進行建模,常見生成式模型有:隱馬爾可夫

生成模型(generative) vs 判別式模型(discriminative)

Andrew Ng, On Discriminative vs. Generative classifiers: A comparison of logistic regression and n

Apache selectNginx epoll模型區別

Linux服務1.select 和epoll模型區別1.1.網絡IO模型概述通常來說,網絡IO可以抽象成用戶態和內核態之間的數據交換。一次網絡數據讀取操作(read),可以拆分成兩個步驟:1)網卡驅動等待數據準備好(內核態)2)將數據從內核空間拷貝到進程空間(用戶態)。根據這兩個步驟處理方式不一樣,我們通常把

機器學習中的概率模型和概率密度估計方法及VAE生成模型詳解之二(作者簡介)

AR aca rtu href beijing cert school start ica Brief Introduction of the AuthorChief Architect at 2Wave Technology Inc. (a startup company

機器學習中的概率模型和概率密度估計方法及VAE生成模型詳解之一(簡介)

價值 新書 The aar 生成 syn TE keras 第一章 A Gentle Introduction to Probabilistic Modeling and Density Estimation in Machine LearningAndA Detailed

機器學習中的概率模型和概率密度估計方法及VAE生成模型詳解之五(第3章 之 EM算法)

ado vpd dea bee OS deb -o blog Oz 機器學習中的概率模型和概率密度估計方法及VAE生成式模型詳解之五(第3章 之 EM算法)

機器學習中的概率模型和概率密度估計方法及VAE生成模型詳解之六(第3章 之 VI/VB算法)

dac term http 51cto -s mage 18C watermark BE ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?

機器學習中的概率模型和概率密度估計方法及VAE生成模型詳解之七(第4章 之 梯度估算)

.com 概率 roc 生成 詳解 time 學習 style BE ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?機器學習中的概率模型和概率密度估計方法及V

機器學習中的概率模型和概率密度估計方法及VAE生成模型詳解之八(第4章 之 AEVB和VAE)

RM mes 9.png size mar evb DC 機器 DG ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?

機器學習中的概率模型和概率密度估計方法及VAE生成模型詳解之九(第5章 總結)

ces mark TP 生成 機器 分享 png ffffff images ? ?機器學習中的概率模型和概率密度估計方法及VAE生成式模型詳解之九(第5章 總結)