How to use svm() function from e1071 package with scaling if data instances have few features with constant or zero values?

I have a training dataset of 2000 instances with 400 features. These features are values of histogram bins. Some of these features have constant and zero values for all data instances, hence scaling can not be applied while using svm() and tune() functions. If they are removed, i face a problem that testing dataset do not have those features with zero or constant values. And i cannot create a model with partial features and then test it with complete set of features. Ay help in this regard is highly appreciable.

Fit and predict on the reduced feature set. Models cannot utilize zero-variance features and therefore those features cannot have an impact on the test set.

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.