1
votes

this question is about LibSVM or SVMs in general. I wonder if it is possible to categorize Feature-Vectors of different length with the same SVM Model.

Let's say we train the SVM with about 1000 Instances of the following Feature Vector: [feature1 feature2 feature3 feature4 feature5]

Now I want to predict a test-vector which has the same length of 5. If the probability I receive is to poor, I now want to check the first subset of my test-vector containing the columns 2-5. So I want to dismiss the 1 feature.

My question now is: Is it possible to tell the SVM only to check the features 2-5 for prediction (e.g. with weights), or do I have to train different SVM Models. One for 5 features, another for 4 features and so on...?

Thanks in advance...

marcus

1

1 Answers

0
votes

You can always remove features from your test points by fiddling with the file, but I highly recommend not using such an approach. An SVM model is valid when all features are present. If you are using the linear kernel, simply setting a given feature to 0 will implicitly cause it to be ignored (though you should not do this). When using other kernels, this is very much a no no.

Using a different set of features for predictions than the set you used for training is not a good approach.

I strongly suggest to train a new model for the subset of features you wish to use in prediction.