Labeling one class for cross validation in libsvm matlab
问题 I want to use one-class classification using LibSVM in MATLAB. I want to train data and use cross validation, but I don't know what I have to do to label the outliers. If for example I have this 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 four are examples of the 1 class, the other four are examples of outliers, just for the cross validation) And I train the model using this: model = svmtrain