[R] Problem with SVM and scaling

Ton van Daelen tvandaelen at scitegic.com
Fri Dec 17 01:03:33 CET 2004


Hi all -
 
I am running into a problem with the SVM() method when applying it to data sets that have descriptors with zero variance. Here is the sequence of events:

1. I split my data set with 512 descriptors in a training and test set
2. I build an SVM model for the training set. Out of 512 descriptors, 500 have zero variance which I discard before calling the SVM method
3. For the test set, 8 descriptors have zero variance, which I discard too
4. predict.svm() then fails, because it tries to scale using two vectors of different size (500 and 504)

Is there a way to get around this?

Thanks - Ton




More information about the R-help mailing list