Reputation: 9
I'm working on a classificaton problem on Weka. I'm taking am arff file as my training data and taking my test data from database. But they are incompatible. In Weka tool I can use the InputMappedClassifier and get over the problem. But I can't implement it in Java code. Please help.
Upvotes: -1
Views: 109
Reputation: 696
This seem to occur for me when the values are in a different order, e.g. one file says
@attribute class {Iris-versicolor,Iris-virginica}
and the other file says
@attribute class {Iris-virginica, Iris-versicolor}
so you might be able to fix this by converting the header information in the test set to match the training set.
Of course, if there are values in the test set that aren't in the training set, this won't work, but that's a different problem.
Upvotes: 1