?? pandr.html
字號:
<html><head> <meta HTTP-EQUIV="Content-Type" CONTENT="text/html;charset=ISO-8859-1"> <title>pandr.m</title><link rel="stylesheet" type="text/css" href="../../m-syntax.css"></head><body><code><span class=defun_kw>function</span> <span class=defun_out>varargout </span>= <span class=defun_name>pandr</span>(<span class=defun_in>model,distrib</span>)
<br><span class=h1>% PANDR Visualizes solution of the Generalized Anderson's task.
</span><br><span class=help>%
</span><br><span class=help>% <span class=help_field>Synopsis:</span></span><br><span class=help>% h = pandr(model)
</span><br><span class=help>%
</span><br><span class=help>% <span class=help_field>Description:</span></span><br><span class=help>% It vizualizes solution of the Generalized Anderson's task
</span><br><span class=help>% for bivariate input Gaussians.
</span><br><span class=help>%
</span><br><span class=help>% The input of the task are two sets of Gaussians which
</span><br><span class=help>% describe the first and second class. The Gaussians are denoted as
</span><br><span class=help>% the ellipses (shape -> covariance, center -> mean).
</span><br><span class=help>% The output of the task is the linear classifier denoted as a line
</span><br><span class=help>% separating the 2D feature space.
</span><br><span class=help>%
</span><br><span class=help>% <span class=help_field>Input:</span></span><br><span class=help>% model [struct] Linear classifier:
</span><br><span class=help>% .W [2 x 1] Normal vector of the separating hyperplane.
</span><br><span class=help>% .b [real] Bias of the hyperplane.
</span><br><span class=help>%
</span><br><span class=help>% distrib [struct] Set of binary labeled Gaussians:
</span><br><span class=help>% .Mean [2 x ncomp] Mean vectors.
</span><br><span class=help>% .Cov [2 x 2 x ncomp] Covariance matrices.
</span><br><span class=help>% .y [1 x ncomp] Labels 1 or 2.
</span><br><span class=help>%
</span><br><span class=help>% <span class=help_field>Output:</span></span><br><span class=help>% h [1 x nobjects] Handles of used graphics objects.
</span><br><span class=help>%
</span><br><span class=help>% <span class=help_field>Example:</span></span><br><span class=help>%
</span><br><hr><br><span class=help1>% <span class=help1_field>About:</span> Statistical Pattern Recognition Toolbox
</span><br><span class=help1>% (C) 1999-2003, Written by Vojtech Franc and Vaclav Hlavac
</span><br><span class=help1>% <a href="http://www.cvut.cz">Czech Technical University Prague</a>
</span><br><span class=help1>% <a href="http://www.feld.cvut.cz">Faculty of Electrical Engineering</a>
</span><br><span class=help1>% <a href="http://cmp.felk.cvut.cz">Center for Machine Perception</a>
</span><br><br><span class=help1>% <span class=help1_field>Modifications:</span>
</span><br><span class=help1>% 4-may-2004, VF
</span><br><span class=help1>% 24-feb-2003, VF
</span><br><span class=help1>% 30-sep-2002, VF
</span><br><br><hr>[err,r,inx] = andrerr( model, distrib );
<br>
<br>[dim, ncomp ] = size( distrib.Mean );
<br><span class=keyword>for</span> i=1:ncomp,
<br> p(i) = exp(-0.5*r^2)/(2*pi*sqrt(det(distrib.Cov(:,:,i))));
<br><span class=keyword>end</span>
<br>
<br>h1 = pgauss( distrib, {<span class=quotes>'p'</span>,p});
<br>h2 = pline( model );
<br>
<br><span class=keyword>if</span> <span class=stack>nargout</span> > 0,
<br> <span class=stack>varargout</span>{1} = [h1 h2];
<br><span class=keyword>end</span>
<br>
<br><span class=jump>return</span>;
<br></code>
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -