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 ...
随机推荐
- delete释放空间时出错的原因
int *a=new int[10]; ...... delete []a; 后面“delete []a;”出现错误的情况大致有: 1 数组的首地址a被你有意无意更改了,如:a++之类的: 2 变量的 ...
- 02MySQL数据库
1.MySQL启动和关闭 2.登录MySQL数据库 MySQL是一个需要账户名密码登录的数据库,登陆后使用,它提供了一个默认的root账号,使用安装时设置的密码即可登录. 格式1:cmd> m ...
- C#基础知识之Dynamic类型
Dynamic类型是C#4.0中引入的新类型,它允许其操作掠过编译器类型检查,而在运行时处理. 编程语言有时可以划分为静态类型化语言和动态类型化语言.C#和Java经常被认为是静态化类型的语言,而Py ...
- 逻辑卷管理器(LVM)
一.什么是LVM? LVM(Logical Volume Manager)逻辑卷管理是在Linux2.4内核以上实现的磁盘管理技术.它是Linux环境下对磁盘分区进行管理的一种机制.现在不仅仅是Lin ...
- es相关查询接口
1.查看指定es中所有的索引 GET http://IP:9200/_cat/indices?v 2.修改指定索引的相关配置信息 PUT http://IP:9200/index_name/_sett ...
- JVM GC Roots
如何确定一个堆中的对象是否死去? 两个思路: 1.引用计数法 给每个对象添加一个引用,用来统计指向该对象的引用计数.有引用时就加1,引用失效时就减1.任何时候引用计数为0,该对象就死亡了.可以被当做垃 ...
- 对Moment.js的研究
创建npm install moment --save-dev 日期格式化 moment().format('MMMM Do YYYY, h:mm:ss a'); // 六月 4日 2019, 6:2 ...
- 2017年cocoaPods 1.2.1升级
还在用老版本的ccoaPods,安装三方库时,会报错 : [!] Invalid `Podfile` file: [!] The specification of `link_with` in the ...
- SQL 介绍和操作
1.什么是SQL SQL的全称是“结构话查询语句”(Structured Query Language ),是1974年有Boyce和chamberlin 提出来的.经过多年的发展,SQL语言已经成为 ...
- Javascript面试题解析
Javascript的一些面试题让很多同学感到头疼,下面就根据兄弟连教育 )毕业学员面试遇到的面试题,给大家做一个简单的分享,希望对初入职场的你们有一些帮助:Javascript面试题解析. 第一题 ...