"Q: when running Weka, we get "Train and test set are not compatible" error.
A: 1. Make sure that the train and test sets have EXACTLY the same attributes (fields),
including last entry:
@attribute Class {MED,MGL,RHB,EPD,JPA}
2. If the attribute descriptions appear to be identical but you still get the same error, you may have an invisible control character in one of the files. Remove the attribute descriptions from the test file and replace them with the attribute descriptions from the train file. That may help.
3. You can also run Weka from the command line, e.g.
java weka.classifiers.IB1 -t train_file.arff -T test_file.arff -p 0
"
From : Data Mining Course Final Project