Generate ARFF file with same header for training and testing

98 Views Asked by At

I have a csv file, I created training/testing set and then covert to arff using python for classification in weka. But for weka the header must be the same (especially for nominal attribute). My question is that is there anyway I could use the same header for training and testing? For example: Training header @attribute A1 {a,b,c} Testing header @attribute A1 {b,a}

1

There are 1 best solutions below

0
fracpete On

Convert the full dataset from CSV to ARFF and then use a Weka filter, like RemovePercentage (not inverted and inverted), to generate train and test set.