Training feature matrix vs Real input

21 Views Asked by At

I am having problems trying to use my model in real scenarios. The original feature matrix used for training is larger than the input data.

Correct me please, I understand that the input in real applications might be much smaller on size and have some different features in the worse cases.

Example: My data set are thousands of text files, they have two categories(Memo (0) or Letter (1) ). I use linearSVC to train a model to classify those files.

Using train_test_split the results are great, now I want to test it with real scenarios. The input in the real scenario will be a file. The file will have less features and possibily different features. In my last test I trained with 4500 features and the input in the real scenario had 350 features.

ValueError: X has 350 features, but LinearSVC is expecting 4500 features as input.

How do I deal with such issue ?

0

There are 0 best solutions below