0
votes

I have image dataset with 6 classes (tomato disease from Kaggle). Using a pretrained model vgg16 I extracted features then just flatten them into 1-dimensioal feature vector. After that, I used this vector as input for my SVM classifier with linear kernel.

  1. How to test my image dataset if it linearly separable or not ?
  2. Applying different kernels in SVM classifier I got the best result with linear kernel ,does it imply that my image dataset is linearly separable ?
2
Hi and welcome to StackOverflow. Could you please improve your question by providing additional information that could help community to answer your question. For instance a code sample, and a more detailed problem description. Also what have you tried? What worked or did not work? - Cninroh
thanks @Cninroh sorry code I cant provide but here what I did (using pretrained model vgg16 I have been extracted features then those features I just flatten them into 1-dimensioal feature vector after that I used this vector as input for my SVM classifier with linear kernel ) that is all what I am trying to do ) - nader salah

2 Answers

0
votes

First question:

But, If you have more than two features, it is hard to visualize seperability. One method would be a discriminant analysis or a univariate histogram of projections in Cherkassky, Vladimir & Dhar, Sauptik (2010):

Second Question:

At first glimpse, yes, but unfortunately u did not provide your results.

just as a sidenote. SVM with linear kernel is the only linear model that is able to classify non linear data, because SVM achieves linear seperability in a higher (possible infinte) dimension.

1
votes

It is usually not your images that are directly « linearly separable », they are the points that result from the features you extract from the images that are linearly separable.

These features can be seen as a kernel applied to the raw images, that project the images into a space. In this last space, data point corresponding to images can be linearly separable and in that case a SVM with linear kernel will be the best choice.

Hence, it really depends on the feature you extract from the images, how you represent them as input of your SVM. When you are using a (more or less deep) neural network, the N-1 first layers can be seen as feature extractor (i.e a parametrized kernel) and the last layer is a linear discriminator that is applied to the resulting representation space (in which you expect data is linearly separable)