label - Labeling one class for cross validation in libsvm matlab -


i want use one-class classification using libsvm in matlab.

i want train data , use cross validation, don't know have label outliers.

if example have data:

traindata =  [1,1,1; 1,1,2; 1,1,1.5; 1,1.5,1; 20,2,3; 2,20,2; 2,20,5; 20,2,2]; labeltraindata = [-1 -1 -1 -1 0 0 0 0];   

(the first 4 examples of 1 class, other 4 examples of outliers, cross validation)

and train model using this:

model = svmtrain(labeltraindata, traindata , '-s 2 -t 0 -d 3 -g 2.0 -r 2.0 -n 0.5 -m 40.0 -c 0.0 -e 0.0010 -p 0.1 -v 2' ); 

i'm not sure value use label 1-class data , use outliers. knows how this?.

thanks in advance. -jessica

according http://www.joint-research.org/wp-content/uploads/2011/07/lukashevich2009using-one-class-svm-outliers-detection.pdf "due lack of class labels in one-class svm, not possible optimize kernel parameters using cross-validation". however, according libsvm faq not quite correct:

q: how choose parameters one-class svm training data in 1 class? have pre-specified true positive rate in mind , search parameters achieve similar cross-validation accuracy.

furthermore readme libsvm source says of input data: "for classification, label integer indicating class label ... one-class svm, it's not used can number."

i think outliers should not included in training data - libsvm ignore training labels. trying find hypersphere contains data not outliers. if train outliers in data libsvm try yo find hypersphere includes outliers, don't want. need training dataset without outliers, validation dataset outliers choosing parameters, , final test dataset see whether model generalizes.


Comments

Popular posts from this blog

jquery - How can I dynamically add a browser tab? -

node.js - Getting the socket id,user id pair of a logged in user(s) -

keyboard - C++ GetAsyncKeyState alternative -