📄 svmclass2.m
字号:
% SVMCLASS2 classifies patterns using SVM decision function.% [pred_labels,dec_fun] = svmclass2(tst_data,trn_data,trn_labels,Alpha,bias,ker,arg)%% SVMCLASS2 classifies patterns using SVM decision function.
% This function is faster C-source code version of svmclass.m.%% To make executable file run 'mex svmclass2.c kernel.c'.%% Input:% tst_data [D x M ] matrix of M testing D-dimensional patterns.% trn_data [D x N ] matrix of N training D-dimensional patterns.% trn_labels [1 x N] pattern labels (1 for 1st class, 2 for 2nd class ).% Alpha [1 x N] Lagrange multipliers of the training patterns.% bias [real] bias of the decision function.% ker [string] kernel identifier: 'linear', 'poly', 'rbf'.% arg [real] kernel argument; for 'linear' is arg=[]; % for 'poly' arg is degree of polynom; for 'rbf' arg is sigma.%% Outputs:% pred_labels [1xM] predicted labels of testing patterns (1 if fpred>=0 else 2).% dec_fun [1 x M] values of decision function for testing patterns.%% See also SVMCLASS, SVM.%
% Statistical Pattern Recognition Toolbox, Vojtech Franc, Vaclav Hlavac% (c) Czech Technical University Prague, http://cmp.felk.cvut.cz.
%
% Modifications
% 21-Oct-2001, V.Franc
% 30-September-2001, V.Franc, comments.% 19-September-2001, V.Franc, created
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -