I m using weka and try to test my file but always got a popup window showing "Train and Test set are not compatible". I m using the csv file. All the attributes are same in both file.out of 30 attributes i divide them in two parts first 20 attributes as training set and rest 10 as test set. pls help me.
Asked
Active
Viewed 401 times
1 Answers
3
Your attributes and their order must be the same in the both files. See following Weka Wiki post and stack overflow question 1 and question 2. Even a small difference may cause this error.
According to you their order may be same but according to weka they are not same. Convert them to arff format and try again. You will see that their arff headers are not same. See below example.
CSV file1
Feature A
true
false
CSV file2
Feature A
false
true
Representation of these CSV files as arff header are not SAME.Since their first occurrence change in files, their order in arff header change too.

Community
- 1
- 1

Atilla Ozgur
- 14,339
- 3
- 49
- 69
-
All the attributes & order are same but still it shows the same error. pls help me.........pls – user1658562 Nov 20 '14 at 08:58
-
@ Sir, After converting the csv file into arff file again a window popup appears showing the "malaria.arff file is not recognised as an Arff data file. Reason unable to determine structureas as Arff (Reason : java.io.IOException: no valid attributes type or invalid enumeration." and also suggest to to use converter but after using it also not working. pls suggest me how to correctly convert it into arff and also suugest me about the conversion tool for it – user1658562 Nov 20 '14 at 13:38
-
1you have a problem with your csv file. Try to correct it – Atilla Ozgur Nov 20 '14 at 14:28