pso-svr代码(用于matlab)
function [nsv,beta,bias]=svr(X,Y,ker,C,loss,e)
% SVR Support Vector Regression
%
% Usage : [nsv beta bias]=svr(X,Y,ker,C,loss,e)
%
% Parameters : X - Training inputs
% Y - Training targets
% ker - kernel function
% C - upper bound ( non - separable case )
% loss - loss function
% e - insensitivity
% nsv - number of support vectors
% beta - Difference of Lagrange Multipliers
% bias - bias term
%
% Author : Steve Gunn ( srg@ecs . soton . ac .uk )
if (nargin<3|nargin>6) % check correct number of arguments
help svr
else
fprintf ('Support Vector Regressing ...\n')
fprintf ('______________________________\n')
n = size (X ,1);
if(nargin<6) e =0.0;end
if(nargin<5) loss='eI