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);
A one class SVM is mainly if you have only inliers and you want to know if test data is similar to that given training data set. More info here. You would need a 2 class binary SVM and add labeled versus non-labelled as two classes 1 and 0. That will make an SVM that is able to seperate inliers from outliers in your case.
I was reading some articles where they were saying that a one class SVM was useful if you weren't just trying to separate out two things but had the things you wanted to identify plus everything else. If I use a one class SVM and then feed it new data what will be the result if I give it an inlier vs an outlier?
Could you reference those articles?
Sure, something like this.
That link says exactly what I told you. It uses the samples of a single class to make a 2 class binary svm look a like as good as possible by trying to wrap the samples into an area covered by the hyperplane. But you have labels, unlabeled and different classes... so you can do it much better by using actual binary SVMs