I have realized a Naive Bayes classificator and in my DB TRAINING have a target row with this label: a,b,c,d.

When i use DB Testing with THIS row label: a,b,c,d,e i think that classifier when see e value then will return unkown but weka prediction give me this error:

ERROR Weka Predictor Execute failed: Col0 column has more possible values in test data than in the training data.

There is a fix for this error?? Tnx to all

I currently don't have a fix, but would like to propose a workaround:

  • Append an additional column to both datasets, i.e. "test" and "train",
  • Concatenate both datasets,
  • Apply the Domain Calculator node,
  • Split dataset into "test" and "train" again,
  • Remove "test"/"train" columns.

The trick is to re-calculate the domain, and split the datasets later one. The Row Filter/Splitter does not touch the domain.