I am trying to train a SVM classifier using scikit-learn.. At training time I want to reduce the feature vector dimension. I have used PCA to reduce the dimension.
pp = PCA(n_components=400).fit(features) features = pp.transform(features)
m x n dataset to determine the variance. but at the time of inference I have only single image and corresponding 1d feature vector.. I am wondering how to reduce feature vector at inference time in order to match the training dimension.
Or if anyone can suggest some other dimension reduction technique that can be used with single image wiil be highly appreciable.