# Is it OK to have only a single class labels in test data for prediction with one-class-svm?

I have a data which has only a single class, namely, '0'. There is no 'not 0' class.

The one-class SVM model was trained on a train dataset containing only a single class '0'. I do not unnecessarily want to find a random 'not 0' class to include in test dataset for prediction.

What will be the output of this approach? How can we interpret the result? What if the specificity is 0? Is it normal or have sensitivity and specificity to be 0? In that case how do we plot ROC curve?

After training it only on '0' class, I tested it on only '0' class (unseen and unlabeled data), and the model still gave '-1' for a few samples. Why did not it give all '1'?

I will appreciate an example on an arbitrary data.

• If you have only a single class, what is your goal in modeling or classifying? – Stephan Kolassa Jul 3 '19 at 6:11
• @StephanKolassa My goal is to identify (classify) '0' class I have. – Hello World Jul 3 '19 at 13:24
• The one-class SVM model was trained on a train dataset containing only a single class '0'. Congratulations! You've trained a model that says 0 all the time! – David Jul 3 '19 at 13:58

If you classify everything as "0", and everything is in fact "0", then every instance is a true positive. There are no false positives, true or false negatives. Sensitivity is $$\frac{n}{n}=1$$, specifity is undefined, $$\frac{0}{0}$$.