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 ...
随机推荐
- 一、ASP.NET Iframework_SignalR永久连接类(v2)
一.新建项目,选MVC项目默认 添加mvc文件夹和核心引用 二.添加SignaIR包 SignalR的准备:NuGet包管理器搜索:工具——>库程序包管理器——>Microsoft.Asp ...
- windows用ffmpeg实现视频剪切
1.安装ffmpeg 从官网下载适合自己版本的FFmpeg,网址是http://ffmpeg.org/download.html,在get the packages中点击windows builds ...
- [每日一学]apache camel|XSLT|SAXON
最近工作中,用到xslt文件来描述和配置xml文件的转换规则和业务逻辑,开始用jdk自带的TransformerFactory, 有严重的性能问题 后来用Saxon 的com.saxonica.con ...
- nginx_mirror_module流量复制在项目中的应用
参考文档:https://my.oschina.net/andChow/blog/2873870 https://blog.csdn.net/lancerh/article/details/88645 ...
- JVM Direct Memory
JVM除了堆内存.栈内存,还有DirectMemory内存,DirectMemory是java nio引入的. 在JDK1.4中新加入了NIO(New INput/Output)类,引入了一种基于通道 ...
- Arduino库
单总线库: 下载地址 : 链接:https://pan.baidu.com/s/1YSuqrXWuBAxMEUWHy8rckw 提取码:svix 把整个文件夹复制到 Arduino安装目录的 ...
- 通过form提交 django的安全机制
通过form提交 在form表单里面需要添加{%csrf_token%} 这样当你查看页面源码的时候,可以看到form中有一个input是隐藏的 总结原理:当用户访问login页面的时候,会生成一个c ...
- jquery 父,子,兄弟节点获取
jquery 父,子,兄弟节点获取 jQuery.parent(expr) //找父元素 jQuery.parents(expr) //找到所有祖先元素,不限于父 ...
- 多线程之同时更改数据问题--启用lock
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.T ...
- POJ 1252 Euro Efficiency ( 完全背包变形 && 物品重量为负 )
题意 : 给出 6 枚硬币的面值,然后要求求出对于 1~100 要用所给硬币凑出这 100 个面值且要求所用的硬币数都是最少的,问你最后使用硬币的平均个数以及对于单个面值所用硬币的最大数. 分析 : ...