当前位置: 首页>>机器学习>>正文


生成模型与判别模型的区别

qingchuan 机器学习, 算法&结构 , 去评论

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).

本文由《纯净的天空》出品。文章地址: https://vimsky.com/article/938.html,未经允许,请勿转载。