svmhyper.m
来自「this a SVM toolbox,it is very useful for」· M 代码 · 共 31 行
M
31 行
function w = svmhyper(Xtrn,Itrn,alpha)% SVMHYPER coputes normal vector of linear SVM decision rule.% w = svmhyper(X,I,Alpha)% % The decision hyperplane is formed by the points x for which % equation w'*x + bias = 0 holds.%% Input:% X [DxM] training patterns.% I [1xM] labels of training patterns.% Alpha [Mx1] Lagrange multipliers.%% Output:% w [Dx1] normal vector.%% See also SVMCLASS, SVM.%% Statistical Pattern Recognition Toolbox, Vojtech Franc, Vaclav Hlavac% (c) Czech Technical University Prague, http://cmp.felk.cvut.cz% Modifications% 19-September-2001, V. Franc, comments changed.dim=size(Xtrn,1);Ytrn=3-2*Itrn;w = (Xtrn.*repmat(Ytrn,dim,1))*alpha';return;
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?