# Binary classfication vs One-class classification

Why do we need samples of both classes for the training of binary classification algorithms, if one-class algorithms can do the job with only samples from one class?

I know that one-class algorithms (like one-class svm) were proposed with the absence of negative data in mind and that they seek to find decision boundaries that separate positive samples (A) from negative ones (Not A).

Hence the traditional binary classification problem (between (A) and (B) for example) can be formulated as a classification of (A) and (not A = B). Is it about better classification results or am I missing something? Thank you in advance

Binary classification is needed when requirement is to capture data into two classes. if you can't capture data in two classes where you need only one you go for One-class. you can check this link for better explanation http://rvlasveld.github.io/blog/2013/07/12/introduction-to-one-class-support-vector-machines/

If you take binary classification, svm tries to find best possible space between A and B. If there is only one class A model tries to create a boundary around it and classify. Take for example patient disease classification: For +ve some symptoms t1, t2, t3, t4, t5 for -ve he has t1, t2, t7. in the above case it is difficult to classify using one class because model classifies patient having t1, t2 as +ve because of proximity to +ve class. The second label gives you more info for better classification.

I think this is what you are looking for:

A binary classifier is used to classify an instance into one of two classes and the reason behind using binary classifier for one class problem is that either an instance belong to that class or not. For example, if your problem is to predict whether there will be rain tomorrow. So either there will be rain tomorrow or not. Another example is that Given an image, your classifier task to precit whether it is male or not. Though you are only concern about one class which is male but still there are two classes i.e. male or not(male).

So, when training your classifier for one class, your data should be instances of that class plus instances of not that class. So, your classifier is capable of accurately classifying an instance whether it belongs to that class or not.