Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Does the one class SVM ignore training labels automatically?

If I'm using CVSVM::ONE_CLASS, will the program just ignore the Mat containing my training labels? I have different classes in my data but there's also outliers which I cannot classify and I'd like my first SVM just try to determine if I can classify they data or if it's an outlier. Does this sound like the kind of thing a one class SVM is good for? I was also wondering will the SVM will return 1 (is a class it recognises) or 0 (is an outlier) or will it return other values?

CvSVMParams params;
params.svm_type=CvSVM::ONE_CL;
params.kernel_type=CvSVM::LINEAR;
params.term_crit=cvTermCriteria(CV_TERMCRIT_ITER, 100000, 1e-6);

CvSVM SVM;
SVM.train(data, trainLabels, cv::Mat(), cv::Mat(), params);