资源介绍
function k = svkernel(ker,u,v)
%SVKERNEL kernel for Support Vector Methods
%
% Usage: k = svkernel(ker,u,v)
%
% Parameters: ker - kernel type
% u,v - kernel arguments
%
% Values for ker: 'linear' -
% 'poly' - p1 is degree of polynomial
% 'rbf' - p1 is width of rbfs (sigma)
% 'sigmoid' - p1 is scale, p2 is offset
% 'spline' -
% 'bspline' - p1 is degree of bspline
% 'fourier' - p1 is degree
% 'erfb' - p1 is width of rbfs (sigma)
% 'anova' - p1 is max order of terms
%
% Author: Steve Gunn (srg@ecs.soton.ac.uk)
if (nargin < 1) % check correct number of arguments
help svkernel
else
global p1 p2;
% could check for correct number of args in here
% but will slow things down further