2
votes

I am using LIBSVM for classification of data. I am mainly doing One Class Classification.

My training sets consists of data of only one class & my testing data consists of data of two classes (one which belong to target class & the other which doesn't belong to the target class).

After applying svmtrain and svmpredict on both training and testing datasets the accuracy which is coming for training sets is 48% and for testing sets it is 34.72%.

Is it good? How can I know whether LIBSVM is classifying the datasets correctly?

1

1 Answers

0
votes

To say if it is good or not depends entirely on the data you are trying to classify. You should search what is the state of the art accuracy for SVM model for your kind of classification and then you will be able to know if your model is good or not.

What I can say from your results is that the testing accuracy is worse than the training accuracy, which is normal as a classifier usually perform better with data it has already seen before.

What you can try now is to play with the regularization parameter (C if you are using a linear kernel) and see if the performance improves on the testing set.

You can also trace learning curves to see if your classifier overfit or not, which will help you choose if you need to increase or decrease the regularization.

For you case, you might want to apply weighting on the classes as the data is often sparse in favor of negative example.

To know whether Libsvm is classifying the dataset correctly you can look at which examples it predicted correctly and which ones it predicted incorrectly. Then you can try to change your features to improve its results.

If you are worried about your code being correct, you can try to code a toy example and play with it or use an example of someone on the web and replicate their results.