I am working on a problem which requires one-class classifier. I am using LIBSVM. I know there are tons of material out there but still I could not find the answer to my query.

  1. How do I estimate the optimum parameters for the RBF kernel?

  2. Using svm-train -s 2 -t 2 -v 5 train.scale, I am getting 49% accuracy and my training set has no outlier data. So, does this actually mean 98% accuracy in real world scenario?

  • $\begingroup$ @gung this is a command line call. $\endgroup$ – Marc Claesen May 8 '14 at 13:47
  • $\begingroup$ @gung the C++ tag is not relevant, I will remove it shortly. The libsvm library is written in C++ and has a command line interface (which is what is being used based on OP). The libsvm library is what is used behind the scenes in most SVM packages in higher languages like Python and R (e.g. in kernlab, e1707, scikit-learn, ...). $\endgroup$ – Marc Claesen May 8 '14 at 13:51
  • $\begingroup$ @MarcClaesen, I think I see, so the idea is you would instal this, open cmd (in Windows) & run it from the prompt? (Clearly, I don't use libsvm...) $\endgroup$ – gung May 8 '14 at 13:59
  • 1
    $\begingroup$ @gung yes, that's the idea. $\endgroup$ – Marc Claesen May 8 '14 at 14:03
  • $\begingroup$ I have read lots of blogs about the parameter selection. Cross validation is suggested by most of people. Come on, how can you use cross vlaidation in training stage with only one class samples available? The classical one class classification problem is that only one class information is given in training stage. You can not calculate the error rate with anomaly samples!! $\endgroup$ – user164348 Jun 7 '17 at 11:30

In one-class SVM the notion of accuracy is out of place. One-class SVM is designed to estimate the support of a distribution. Basically, it's output for a given instance is a measure of confidence of that instance belonging to the data that was used in training the model.

When constructing a one-class SVM model, you have to decide how much of your data can be considered outliers (e.g. rejected by the model). You can tune kernel parameters using a cross-validation approach.

I am getting 49% accuracy and my training set has no outlier data. So, does this actually mean 98% accuracy in real world scenario?

I don't really understand the question here. It sounds like you are using one-class SVM for a binary classification problem, which is a bad idea.

  • $\begingroup$ In my model, i only have data of one class. Now, while testing i need to check whether a data is in that class or not. So, this is a problem of one-class classification. Now please tell me how can i do the parameter tuning ? $\endgroup$ – Dib May 8 '14 at 14:02
  • $\begingroup$ The criterion to be optimized for one-class SVM is the weighted average of misclassification rates on the target set and the set of outliers. If you want to sensibly train a one-class SVM you need to have some notion of the rejection rate you want. Without this, you can't do model selection. $\endgroup$ – Marc Claesen May 8 '14 at 14:11
  • $\begingroup$ Ok. I am not familiar with rejection rates related machine learning. Please help me with some links to begin with. $\endgroup$ – Dib May 8 '14 at 14:23
  • $\begingroup$ @Dib I will extend my answer with some examples later when I have more time. $\endgroup$ – Marc Claesen May 8 '14 at 14:30

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.