# Feature selection for test data?

We are applying feature selection for train data. Assume that we are having 1000 selected features. The testing data contains more than 1000 features. It results in prediction error "The number of features at training time in scikit learn". How can we reduce the number of features in testing data? Should we apply feature selection for testing data also?

• As mentioned, you should not use the same feature selection process. You should use the same features that are selected during training time. For example, say during the training you find out that the most relevant features are $f_2, f_3, f_4$. During the test time, you should use the same features $f_2, f_3, f_4$. – Hossein Mar 30 '17 at 5:37