📄 ssvm2.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">SSVM2</b><td valign="baseline" align="right" class="function"><a href="../svm/index.html" target="mdsdir"><img border = 0 src="../up.gif"></a></table> <p><b>Single-class SVM with L2-soft margin.</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 = ssvm2(X,options)</span><br><span class=help></span><br><span class=help> <span class=help_field>Description:</span></span><br><span class=help> This function trains the single-class SVM with L2-soft margin.</span><br><span class=help> The task is to find hyperplane passing through the origin</span><br><span class=help> such that the input vectors lie on one side of the hyperplane.</span><br><span class=help> The margin between data and the hypeplane should be maximized.</span><br><span class=help> In the case of data its convex hull contains the origin </span><br><span class=help> (non-separable data) the L2-soft margin relaxation is applied.</span><br><span class=help> The hyperplane is sought for in the feature space induced by </span><br><span class=help> the prescribed kernel.</span><br><span class=help> </span><br><span class=help> <span class=help_field>Input:</span></span><br><span class=help> X [dim x num_data] Input vectors.</span><br><span class=help> </span><br><span class=help> options [struct] Control parameters:</span><br><span class=help> .ker [string] Kernel identifier.</span><br><span class=help> .arg [1xnars] Kernel argument(s).</span><br><span class=help> .solver [string] Used quadratic programming solver; options are </span><br><span class=help> 'mdm','kozinec' or 'npa' (default).</span><br><span class=help> .tmax [1x1] Maximal number of iterations.</span><br><span class=help> .tolabs [1x1] Absolute tolerance stopping condition.</span><br><span class=help> .tolrel [1x1] Relative tolerance stopping condition.</span><br><span class=help> </span><br><span class=help> <span class=help_field>Output:</span></span><br><span class=help> model [string] Hyperplane in the kernel feature sapce:</span><br><span class=help> .Alpha [nsv x 1] Weights.</span><br><span class=help> .b [1x1] Bias equal to 0.</span><br><span class=help> .sv.X [dim x nsv] Selected vectors.</span><br><span class=help> .options [struct] Copy of input options.</span><br><span class=help> .exitflag [1x1] Indicates which stopping condition was used:</span><br><span class=help> UB <= tolabs -> exit_flag = 1 Abs. tolerance.</span><br><span class=help> (UB-LB)/(LB+1) <= tolrel -> exit_flag = 2 Relative tolerance.</span><br><span class=help> t >= tmax -> exit_flag = 0 Number of iterations.</span><br><span class=help> .UB [1x1] Upper bound on the optimal solution.</span><br><span class=help> .LB [1x1] Lower bound on the optimal solution.</span><br><span class=help> .t [1x1] Number of iterations.</span><br><span class=help> .kercnt [1x1] Number of kernel evaluations.</span><br><span class=help> .margin [1x1] Achieved margin.</span><br><span class=help> .trnerr [1x1] Training error.</span><br><span class=help> .History [2x(t+1)] UB and LB with respect to number of iterations.</span><br><span class=help> </span><br><span class=help> <span class=help_field>Example:</span></span><br><span class=help> load('scales','X');</span><br><span class=help> model = ssvm2(X);</span><br><span class=help> figure; axis([-1 1 -1 1]); grid on;</span><br><span class=help> ppatterns(X); ppatterns(model.sv.X,'ob',13);</span><br><span class=help> 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 = "../svm/svmclass.html" target="mdsbody">SVMCLASS</a>, SVM.</span><br><span class=help></span><br></code></div> <hr> <b>Source:</b> <a href= "../svm/list/ssvm2.html">ssvm2.m</a> <p><b class="info_field">Modifications: </b> <br> 15-jun-2004, VF<br> 23-Jan-2004, VF<br> 22-Jan-2004, VF<br> 19-Oct-2003, VF<br></body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -