I am interested to know what happens if I have enough positive examples and I train a Classifier with those but no negative examples were provided. Since I am interested to find outliers (anything other than positive class), will this model work? What is the necessity of using even small amount of negative class or unlabelled examples? Using analogy for explanation is much appreciated.
-
You are looking for one-class classifiers like one class SVM, isolet trees etc. – Vladislavs Dovgalecs Sep 29 '16 at 20:58
2 Answers
A typical classifier will probably fail miserably. However, the type of problem you refer to is know as one-class classification. You can see a great description of one-class SVM here or go to this wiki page.
Conceptually, think of a simple 2 feature linear SVM. You are trying to draw a line that best separates the 2 groups, but with only 1 group where would you draw that line? However, you could imagine a one-class SVM where instead you draw a circle encompassing all of the training samples.

- 324
- 1
- 3
-
1If anyone interested, `sklearn` has `OneClassSVM`: https://scikit-learn.org/stable/modules/generated/sklearn.svm.OneClassSVM.html – hafiz031 Mar 13 '21 at 15:24
By definition, classification means discriminating between several classes. If you're only providing a single class, then there won't be anything to classify ; most classification libraries will (sensibly) throw some kind of error, and those that don't will obviously predict the only class you provided for all subsequent examples.
There are models for outlier detection, but that is in the domain of unsupervised learning, and not classification, which is supervised.

- 878
- 5
- 10
-
4Classification means discriminating between several classes, but your data doesn't have to show all the classes. If I showed you a picture of a person's face and say "this is a face", and then I do the same to a different person's face, then again another person's face, and so on. Then I show you a picture of a keyboard, and ask "is this a face?" would you get it right? Most definitely, but you've never seen the "not face" class before. How did you know? You can say this is an outlier, but there are many many outliers. Outlier almost implies that the # is small. – thang Sep 12 '17 at 10:00
-
1@thang You would easily discriminate between these things because of the particular way the brain has evolved to learn, and also because you have already been exposed to this class of problem many, many times in your life and thus learned which features are usually salient and to what degree. – user359996 Jul 22 '20 at 17:21
-
@thang this is not as straightforward always. I think @user359996 is right. You might enjoy some pictures of `crocodiles vs. alligators`, `turtles vs. tortoises`, `moths vs. butterflies`, `dolphins vs. porpoises`, `lizards vs. salamanders` or `leopards vs. jaguars`. For each pair, if someone never has seen the other species, almost always they will fail to distinguish them. – hafiz031 Mar 13 '21 at 15:38