📄 ekozinec.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">EKOZINEC</b><td valign="baseline" align="right" class="function"><a href="../../linear/finite/index.html" target="mdsdir"><img border = 0 src="../../up.gif"></a></table> <p><b>Kozinec's algorithm for eps-optimal separating hyperplane.</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> model = ekozinec(data)</span><br><span class=help> model = ekozinec(data,options)</span><br><span class=help> model = ekozinec(data,options,init_model)</span><br><span class=help></span><br><span class=help> <span class=help_field>Description:</span></span><br><span class=help> This function is implementation of the Kozinec's algorithm</span><br><span class=help> with eps-optimality stopping condition [<a href="../../references.html#SH10" title = "M.I.Schlesinger and V.Hlavac. Ten lectures on statistical and structural pattern recognition. Kluwer Academic Publishers, 2002." >SH10</a>]. The algorithm </span><br><span class=help> finds the eps-optimal separating hyperplane.</span><br><span class=help> </span><br><span class=help> model=ekozinec(data) the Kozinec's rule is used to find the closest </span><br><span class=help> points w1, w2 from the convex hulls of the vectors from the first and </span><br><span class=help> the second class. The found points determine the optimal separating </span><br><span class=help> hyperplane. </span><br><span class=help> </span><br><span class=help> model=ekozinec(data,options) specifies stopping conditions of</span><br><span class=help> the algorithm in structure options:</span><br><span class=help> .eps [1x1] ... controls how close is the found solution to</span><br><span class=help> the optimal hyperplane in terms of margin </span><br><span class=help> (default eps=0.01). The options for eps are: </span><br><span class=help> eps > 0 ... eps-optimal hyperplane is sought for.</span><br><span class=help> eps == 0 ... algorithm converges to the optimal hyperplane (but it</span><br><span class=help> does not have to stop in finite number of iterations).</span><br><span class=help> eps < 0 ... algorithm stops when the separating hyperplane </span><br><span class=help> is found (zero training error) regardless the margin </span><br><span class=help> so it solves the same task as the ordinary Perceptron.</span><br><span class=help> .tmax [1x1]... maximal number of iterations.</span><br><span class=help></span><br><span class=help> model = ekozinec(data,options,init_model) specifies initial model</span><br><span class=help> which must contain:</span><br><span class=help> .W1 [dim x 1] ... Vector from the first convex hull.</span><br><span class=help> .W2 [dim x 1] ... Vector from the second convex hull.</span><br><span class=help></span><br><span class=help> <span class=help_field>Input:</span></span><br><span class=help> data [struct] Labeled (binary) training data. </span><br><span class=help> .X [dim x num_data] Input vectors.</span><br><span class=help> .y [1 x num_data] Labels (1 or 2).</span><br><span class=help></span><br><span class=help> options [struct] </span><br><span class=help> .eps [real] Controls how closeness to the optimal hypeprlane (see above).</span><br><span class=help> .tmax [1x1] Maximal number of iterations (default tmax=inf).</span><br><span class=help> </span><br><span class=help> init_model [struct] Initial model; must contain items</span><br><span class=help> .W1 [dim x 1], .W2 [dim x 1] see above.</span><br><span class=help></span><br><span class=help> <span class=help_field>Output:</span></span><br><span class=help> model [struct] Binary linear classifier:</span><br><span class=help> .W [dim x 1] Normal vector of hyperplane.</span><br><span class=help> .b [1x1] Bias of hyperplane.</span><br><span class=help> </span><br><span class=help> .W1 [dim x 1] The nearest vector of the first convex hull.</span><br><span class=help> .W2 [dim x 1] The nearest vector of the second convex hull.</span><br><span class=help> .margin [1x1] Margin of the found hyperplane.</span><br><span class=help> .exitflag [1x1] 1 ... eps-optimality condition satisfied or separating</span><br><span class=help> hyperplane has been found </span><br><span class=help> 0 ... number of iterations exceeded tmax.</span><br><span class=help> .t [1x1] Number of iterations.</span><br><span class=help></span><br><span class=help> <span class=help_field>Example:</span></span><br><span class=help> data = genlsdata( 2, 50, 1);</span><br><span class=help> model = ekozinec(data, struct('eps',0.01));</span><br><span class=help> figure; ppatterns(data); pline(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 = "../../linear/finite/perceptron.html" target="mdsbody">PERCEPTRON</a>, <a href = "../../linear/finite/mperceptron.html" target="mdsbody">MPERCEPTRON</a>, <a href = "../../linear/linclass.html" target="mdsbody">LINCLASS</a>.</span><br><span class=help></span><br></code></div> <hr> <b>Source:</b> <a href= "../../linear/finite/list/ekozinec.html">ekozinec.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> 19-may-2004, VF<br> 3-may-2004, VF<br> 17-Sep-2003, VF<br> 17-Feb-2003, VF<br> 16-Feb-2003, VF<br> 21-apr-2001, V.Franc, created<br></body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -