📄 bayeserr.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">BAYESERR</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>Bayesian risk for 1D Gaussians and 0/1-loss.
</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> [risk,eps1,eps2,inter1] = bayeserr(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 Bayesian risk of a classifier
</span><br><span class=help> 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 univariate Gaussians.
</span><br><span class=help>
</span><br><span class=help> <span class=help_field>Input:</span></span><br><span class=help> model [struct] Mixture of two univariate Gaussians.
</span><br><span class=help> .Mean [1x2] Mean values [Mean1 Mean2].
</span><br><span class=help> .Cov [1x2] Covariances [Cov1 Cov2].
</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> risk [1x1] Bayesian risk for an optimal classifier.
</span><br><span class=help> eps1 [1x1] Integral of p(x|k=1) over x in L2, where
</span><br><span class=help> L2 is the area where x is classified to the 2nd class.
</span><br><span class=help> eps2 [1x1] Integral of p(x|k=1) over x in L1, where
</span><br><span class=help> L1 is the area where x is classified to the 1nd class.
</span><br><span class=help> inter1 [1x2] or [1x4] One or two intervals describing L1.
</span><br><span class=help>
</span><br><span class=help> <span class=help_field>Example:</span></span><br><span class=help> model = struct('Mean',[0 0],'Cov',[1 0.4],'Prior',[0.4 0.6]);
</span><br><span class=help> figure; hold on;
</span><br><span class=help> h = pgmm(model,struct('comp_color',['r' 'g']));
</span><br><span class=help> legend(h,'P(x)','P(x|y=1)*P(y=1)','P(x|y=2)*P(y=2)');
</span><br><span class=help> [risk,eps1,eps2,interval] = bayeserr(model)
</span><br><span class=help> a = axis;
</span><br><span class=help> plot([interval(2) interval(2)],[a(3) a(4)],'k');
</span><br><span class=help> plot([interval(3) interval(3)],[a(3) a(4)],'k');
</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/bayesdf.html" target="mdsbody">BAYESDF</a>, <a href = "../bayes/bayescls.html" target="mdsbody">BAYESCLS</a></span><br><span class=help><span class=also></span><br></code></div> <hr> <b>Source:</b> <a href= "../bayes/list/bayeserr.html">bayeserr.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> 02-may-2004, VF
<br> 19-sep-2003, VF
<br> 27-Oct-2001, VF
<br></body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -