softmargin.m
资源名称:svm.zip [点击查看]
上传用户:xfjled
上传日期:2007-05-06
资源大小:150k
文件大小:0k
源码类别:
matlab例程
开发平台:
Matlab
- function y = softmargin(x)
- %SOFTMARGIN Support Vector Classification Softmargin
- %
- % Usage: y = softmargin(x)
- %
- % Author: Steve Gunn (srg@ecs.soton.ac.uk)
- if (nargin ~= 1) % check correct number of arguments
- help softmargin
- else
- y = x;
- y(find(x < -1)) = -1;
- y(find(x > 1)) = 1;
- end