The Difference Between Distriminative Models And Generative Models
簡單來說,判別模型對p(y|x)建模,而生成模型對p(x|y)建模,其中x是特征(features),y是標簽(labels)。判別模型直接可以預測新實例的值,生成模型要借助貝葉斯公式p(y|x) = p(x|y)p(y)/p(x)來做預測。
典型的判別模型: SVM, 邏輯回歸,最大熵
典型的生成模型:樸素貝葉斯,高斯混合,LDA。
Andrew NG 版的說明如下:
Algorithms that try to learn p(y|x) directly (such as logistic regression), or algorithms that try to learn mappings directly from the space of inputs X to the labels {0, 1}, (such as the perceptron algorithm) are called discrim- inative learning algorithms. Here, we’ll talk about algorithms that instead try to model p(x|y) (and p(y)). These algorithms are called generative learning algorithms. For instance, if y indicates whether an example is a dog (0) or an elephant (1), then p(x|y = 0) models the distribution of dogs’ features, and p(x|y = 1) models the distribution of elephants’ features.
Ng, A. “Lecture notes for machine learning.” (2010).