Home > @SVMClassifier > SVMClassifier.m

SVMClassifier

PURPOSE ^

function [svmCl] = SVMClassifier

SYNOPSIS ^

function [svmCl] = SVMClassifier(nc, libSvmTrnOpts, libSvmPrdOpts)

DESCRIPTION ^

 function [svmCl] = SVMClassifier
 constructor for the SVMClassifier class

   Inputs:
       nc: number of classes
       libSVMopts: string of libsvm options

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function [svmCl] = SVMClassifier(nc, libSvmTrnOpts, libSvmPrdOpts)
0002 % function [svmCl] = SVMClassifier
0003 % constructor for the SVMClassifier class
0004 %
0005 %   Inputs:
0006 %       nc: number of classes
0007 %       libSVMopts: string of libsvm options
0008 
0009 if nargin == 0 || isempty(nc)
0010     nc = 2;
0011 end
0012 if nargin < 2 || isempty(libSvmTrnOpts)
0013     libSvmTrnOpts = '-q';
0014 else
0015     libSvmTrnOpts = [libSvmTrnOpts ' -q'];
0016 end
0017 
0018 if nargin < 3 || isempty(libSvmPrdOpts)
0019     libSvmPrdOpts = '-q';
0020 else
0021     libSvmPrdOpts = [libSvmPrdOpts ' -q'];
0022 end
0023 
0024 svmCl.trainedSVM = NaN;
0025 svmCl.libSvmTrnOpts = libSvmTrnOpts;
0026 svmCl.libSvmPrdOpts = libSvmPrdOpts;
0027 
0028 svmCl = class(svmCl, 'SVMClassifier', Classifier(nc));

Generated on Sun 29-Sep-2013 01:25:24 by m2html © 2005