Currently I'm using svm to classify the test samples to two different classes (True and False). When I use multi class classification, I have both true and false samples in my training set, the accuracy is always above 90%, but if I use one class classification (only true samples in the training set), the accuracy is very low (0%). In one class classification, I use radial basic function, I also tried setting different value for nu, but it didn't work.
I'm using libsvm library for java. I also scaled data before training.
Then, Did I misunderstand something about one class classification with svm ? Thank you very much.
You should use two-class SVM instead of one-class. One-class classification is usually used to estimating the support of the high-dimensional distribution of the data. It can be used to estimate a decision boundary between two classes (usually one class vs. rest). @cbeleites gives more details about the different situations for classifying two classes.
You may want to refer to part 2 in the documentation (pdf) of LibSVM for a quick understanding of the difference in the formulation.
In general, one-class classification tackles a different type of classification problems from binary or multiclass classification.
Which is more appropriate will depend on your problem. One-class classification can deal with a type of classification task that is ill-defined in a binary sense, typically in vs. out situations where the "out" class may be everything.
As an example, consider medical diagnostics:
Distinguishing patients with a particular disease D from normal ("healthy") patients is usually a binary classification problem: both D and "healthy" are reasonably well-defined classes.
On contrast, distinguishing patients with disease D form patients who do not have disease D is an ill-defined problem from a binary classification point of view: while disease D may be reasonably well defined, "not D" can be anything. From healthy patients over all other possible diseases. This would be a situation where it may be good to consider a one-class classifier.
If however you can be reasonably sure that the measurement data / independent variates / features you use for classification will be reasonably similar for evereyone who does not have disease D, again a binary set-up is more appropriate.
Differential diagnostis that distinguishes between a given set of diseases is a typical multiclass problem.
@Yuanning already explained why the one-class classification isn't what you probably expected.