📄 svmhyper.m
字号:
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 + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -