I have some doubts about how to model a system based on one class SVM, which I plan to use for detecting outliers or anomalous data. For example, when I used a neural network or SVM model the procedure I followed was roughly the following:

  1. Normalize if needed both train and test data
  2. Shuffle the data
  3. Divide the data into train and test data with their respective labels
  4. Apply model

I have not used one class SVM before and I want to measure some rare events. So I have a dataset that contains the normal behaviour of an event, lets called data1. Also, I have a small dataset that also belongs to data 1, approximately 20% of the size of data1, but it contains rare events or what could be considered as outliers and lets called data2. I have followed these steps for the one svm model:

  1. Normalize both datasets
  2. Divide the data into train and test set, here I do not have labels
  3. Train the model with the train data or data 1 and test it with data 2

I was wondering if there is the need to shuffle the data as it was done in the supervised models or can I train and test them without doing that step. It might sound rather a simple question, but I was not able to find any information about how to do it, and in some examples on the web they do not perform this step.

Thanks for your help.


1 Answer 1


There's no need to shuffle data for SVM, as it's nonparametric learning algorithm, moreover most built-in implementation uses the Sequential minimal optimization (SMO) algorithm, the algorithm uses a heuristic for choosing which example eligible for optimization.

It's not a part of your question, but I would like to mention that normalization going to hurt your objective (outliers detection), as there's some trade off between normalization and outliers, roughly speaking by normalizing input-space you are going to reduce the outliers (influence), and for SVM it's meant that, the distance (i.e. support vectors linear response) going to be reduced too.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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