📄 bayesdf.html
字号:
<html><head> <meta HTTP-EQUIV="Content-Type" CONTENT="text/html;charset=ISO-8859-1"> <title>Contents.m</title><link rel="stylesheet" type="text/css" href="../stpr.css"></head><body><table border=0 width="100%" cellpadding=0 cellspacing=0><tr valign="baseline"><td valign="baseline" class="function"><b class="function">BAYESDF</b><td valign="baseline" align="right" class="function"><a href="../bayes/index.html" target="mdsdir"><img border = 0 src="../up.gif"></a></table> <p><b>Computes decision boundary of Bayesian classifier.
</b></p> <hr><div class='code'><code><span class=help>
</span><br><span class=help> <span class=help_field>Synopsis:</span></span><br><span class=help> quad_model = bayesdf(model)
</span><br><span class=help>
</span><br><span class=help> <span class=help_field>Description:</span></span><br><span class=help> This function computes parameters of decision boundary
</span><br><span class=help> of the Bayesian classifier with the following assumptions:
</span><br><span class=help> - 1/0 loss function (risk = expectation of misclassification).
</span><br><span class=help> - Binary classification.
</span><br><span class=help> - Class conditional probabilities are multivariate Gaussians.
</span><br><span class=help>
</span><br><span class=help> In this case the Bayesian classifier has the quadratic
</span><br><span class=help> discriminant function
</span><br><span class=help> f(x) = x'*A*x + B'*x + C,
</span><br><span class=help>
</span><br><span class=help> where the classification strategy is
</span><br><span class=help> q(x) = 1 if f(x) >= 0,
</span><br><span class=help> = 2 if f(x) < 0.
</span><br><span class=help>
</span><br><span class=help> <span class=help_field>Input:</span></span><br><span class=help> model [struct] Two multi-variate Gaussians:
</span><br><span class=help> .Mean [dim x 2] Mean values.
</span><br><span class=help> .Cov [dim x dim x 2] Covariances.
</span><br><span class=help> .Prior [1x2] A priory probabilities.
</span><br><span class=help>
</span><br><span class=help> <span class=help_field>Output:</span></span><br><span class=help> quad_model.A [dim x dim] Quadratic term.
</span><br><span class=help> quad_model.B [dim x 1] Linear term.
</span><br><span class=help> quad_model.C [1x1] Bias.
</span><br><span class=help>
</span><br><span class=help> <span class=help_field>Example:</span></span><br><span class=help> trn = load('riply_trn');
</span><br><span class=help> tst = load('riply_trn');
</span><br><span class=help> gauss_model = mlcgmm(trn);
</span><br><span class=help> quad_model = bayesdf(gauss_model);
</span><br><span class=help> ypred = quadclass(tst.X,quad_model);
</span><br><span class=help> cerror(ypred,tst.y)
</span><br><span class=help> figure; ppatterns(trn); pboundary(quad_model);
</span><br><span class=help>
</span><br><span class=help> <span class=also_field>See also </span><span class=also>
</span><br><span class=help><span class=also> <a href = "../bayes/bayescls.html" target="mdsbody">BAYESCLS</a>, <a href = "../quadrat/quadclass.html" target="mdsbody">QUADCLASS</a>
</span><br><span class=help><span class=also>
</span><br></code></div> <hr> <b>Source:</b> <a href= "../bayes/list/bayesdf.html">bayesdf.m</a> <p><b class="info_field">About: </b> Statistical Pattern Recognition Toolbox
<br> (C) 1999-2003, Written by Vojtech Franc and Vaclav Hlavac
<br> <a href="http://www.cvut.cz">Czech Technical University Prague</a>
<br> <a href="http://www.feld.cvut.cz">Faculty of Electrical Engineering</a>
<br> <a href="http://cmp.felk.cvut.cz">Center for Machine Perception</a>
<br> <p><b class="info_field">Modifications: </b>
<br> 18-oct-2005, VF, dealing with Cov given as vector repared
<br> 01-may-2004, VF
<br> 19-sep-2003, VF
<br> 24. 6.00 V. Hlavac, comments into English.
<br></body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -