How to change the nominal order of attribute values ββin WEKA GUI?
I have 2 datasets for training and testing with weka. They both have the same number of attributes and the same data type for variables (numeric or nominal). But they are incompatible with each other, because the order of the nominal values ββis different
ex - Training set
Occupation
1 Doctor 40%
2 Engineer 40%
3 Teacher 20%
Test set
1 Engineer 40%
2 doctor 40%
3 Teacher 20%
Thus, both sets are incompatible. My question is, how do I change this separate order of the values ββto make them compatible?
source to share
It looks a bit like a data preprocessing problem. I am very curious how the training and testing results ended up like this!
If you want to change the nominal values, you can use RenameNominalValues to rename your data labels. One possible way is to apply this to your testing data:
This solution assumes that you are dealing with the Nominal attribute, that this is your last attribute, and they are marked as shown in the valueReplacements field.
Otherwise, depending on the number of cases, you can manually edit the values ββor use your favorite table to replace the values.
Hope it helps!
source to share