After struggling with the same problem during the day. I figured out two ways to make the trained model work with the installed test suite.
Method 1. Use the flow of knowledge. For example, something like below: CSVLoader (for a set of trains) β classAssigner β TrainingSetMaker β (classifier of your choice) β ClassfierPerformanceEvaluator - TextViewer. CSVLoader (for test suite) -> classAssigner -> TestgSetMaker -> (same class instance above) -> PredictionAppender -> CSVSaver. Then load data from CSVLoader or arffLoder for a set of workouts. The model will be trained. After that, data is loaded from the bootloader for the test suite. It will evaluate the model (for example, the classifier) ββon the supplied test suite, and you can see the result from a text editor (connected to the ClassifierPerformanceEvaluator) and get the saved result from CSVSaver or arffSaver connected to the additional PredictionAppender column. "classfied as" will be added to the output file. In my case, I used "?" for the class column in the supplied test case, if class labels are not available.
Method 2. Combine the training and testing kit into one file. Then the same filter can be applied to both training and test sets. You can then separate the training set and test set by applying an instance filter. So how do I use "?" as a class label in a test case. It does not appear in instance filter indexes. Therefore, simply select the indexes that you can see in the attribute values ββthat you want to remove when applying the instance filter. You will receive only test data. Save it and load it into the test delivery kit on the classifier page. At this time, he will work. I think this is an attribute of a class that causes a non-compatible ride and test suite. Since many classfier requires a nominal class attribute. The value of which is converted into an index into the accessible values ββof the class attribute according to http://weka.wikispaces.com/Why+do+I+get+the+error+message+%27training+and+test+set+are+not+compatible%27 % 3F
d0_0b
source share