Generative Model vs Discriminative Model
In this post, we are going to compare the two types of machine learning models-generative model and discriminative model-, whose underlying ideas are quite different. Also, a typical generative classification algorithm called Gaussian Discriminant Analysis will be introduced.
Discriminative Model
The most basic discriminative classifier in Machine Learning is Logistic Regression, and a decision boundary is learned to segregate points from two classes in training set. When a new point comes, the algorithm classifies it by checking which side of the boundary it falls. Logistic Regression do classification by calculating p(Y|X,θ), which is modeled by:

g is the sigmoid function. So this is the idea of Discriminative Algorithm: directly calculate p(Y|X,θ).
Generative Model
Generative Algorithm tries to achieve the same goal p(Y|X,θ) using another way: Bayes Rule, which is in the form of:

The key to solve this equation is to get p(X|Y), this need building seperate models for different Y.
When the input X is continuous random variable, we can then use the Gaussian Discriminant Analysis (GDA) model, which models p(x|y) using a multivariate normal distribution.

If we write out them:

then we can calculate the probability for a specific x using Bayes Rule. When X is discrete, we turn to Naive Bayes, which is also a Generative Algorithm.
In conclusion, the idea for Generative Model is to build a model for each class, and then use Bayes Rule to back up getting P(Y|X).

This picture shows the difference ideas of the two groups of algorithms.
Generative Model vs Discriminative Model的更多相关文章
- Generative model 和Discriminative model
学习音乐自动标注过程中设计了有关分类型模型和生成型模型的东西,特地查了相关资料,在这里汇总. http://blog.sina.com.cn/s/blog_a18c98e50101058u.html ...
- 转Generative Model 与 Discriminative Model
没有完全看懂,以后再看,特别是hmm,CRF那里,以及生成模型产生的数据是序列还是一个值,hmm应该是序列,和图像的关系是什么. [摘要] - 生成模型(Generative Model) :无 ...
- Generative Model 与 Discriminative Model
[摘要] - 生成模型(Generative Model) :无穷样本==>概率密度模型 = 产生模型==>预测 - 判别模型(Discriminative Model): ...
- 生成模型(Generative Model)和 判别模型(Discriminative Model)
引入 监督学习的任务就是学习一个模型(或者得到一个目标函数),应用这一模型,对给定的输入预测相应的输出.这一模型的一般形式为一个决策函数Y=f(X),或者条件概率分布P(Y|X). 监督学习方法又可以 ...
- 生成模型(Generative Model)Vs 判别模型(Discriminative Model)
概率图分为有向图(bayesian network)与无向图(markov random filed).在概率图上可以建立生成模型或判别模型.有向图多为生成模型,无向图多为判别模型. 判别模型(D ...
- MVC中@Html.DisPlayFor(model=>model.newsName)和 @Model.newsName的区别
MVC中,在Controllers查询到数据,返回一个实体给View并显示,可以用@Html.DisPlayFor(model=>model.newsName)和 @Model.newsName ...
- 【转载】Analysis Service Tabular Model #003 Multidimensional Model VS Tabular Model 我们该如何选择?
由于Multidimensional Model 和 Tabular Model 并不能互相转换, 所以在项目之初就应该要考虑好选择哪一种模型进行开发. 以下只是一些建议: Licensing 许可和 ...
- JFinal项目eclipse出现the table mapping of model: com.gexin.model.scenic.Scenic not exists or the ActiveRecordPlugin not start.
JFinal项目eclipse出现the table mapping of model: com.gexin.model.scenic.Scenic not exists or the ActiveR ...
- MVC:一个View显示多个Model(多个Model你可以使用ViewBag或ViewData , 或者:Model["myInfo"] as)
MVC:一个View显示多个Model 多个Model你可以使用ViewBag或ViewData , 或者:Model["myInfo"] as. 比如: Tuple<str ...
随机推荐
- mirror - 映射在远端节点上的档案
总览 SYNOPSIS mirror [flags] -gsite:pathname mirror [flags] [package-files] 描述 DESCRIPTION Mirror 是以 P ...
- 3.17内存,进程,rpm和yum,python编译安装
一.内存 前面说过内存有寄存器.高速缓存和内存条 但在实际情况中有些文件比较大,内存不足以读取其内容,并且大部分内容不是被立即使用,所以有了交换分区,即用硬盘空间临时存储相关部分,当作缓存,这部分就是 ...
- 05.Linux系统-WCP知识共享平台安装部署(旗舰版)
WCP知识共享平台部署 一.环境准备 操作系统:CentOS Linux release 7.5.1804 (Core) Java:jdk-7u79-linux-x64.tar.gz 中间件:apac ...
- vscode 黑屏及类名报错解决方案
1.安装vscode之后打开黑屏,解决方案如下图,右键--属性--兼容性--勾选上 2.vscode 类名总报错 是ES2017的语法修饰器引起vscode警告. 解除的方法如果你使用的typescr ...
- string遍历
#include <iostream>#include <string> using namespace std;int main(int argc, const char * ...
- python List 常用方法
list是python常用的数据类型,属于可变的数据类型.用[]表示,里面的元素用','隔开,并且里面的元素类型可以不同,对于每个元素,list都有一个索引一一对应,第一个元素的索引是0,第二个是1, ...
- java 类记载器
转载: https://blog.csdn.net/javazejian/article/details/73413292
- Spring Boot日志处理
2.4 日志处理 2.4.1 记录日志内容 请求url 访问者ip 调用方法classMethod 参数args 返回内容 2.4.2 新建包aspect,新建日志切面处理类 package com. ...
- Vue-搭建环境
项目开发完react-native,因为又对vue开始感兴趣了,又开始自学起了vue,关于vue是一个很简便的前端框架,要学习它,当然是要先学会搭建vue的环境, 不会搭建环境的程序员不是一个好的程序 ...
- css3 中的2D转换
一.CSS3转换 通过转换实现对对元素进行旋转.缩放.移动.拉伸的效果:这种原来必须要通过JS或者图片处理才可以实现的效果,现在都可以通过CSS3来完成. 2D转换采用transform属性来实现效果 ...