Combining output from many classifiers

There is a Vote note which I don't quite understand, so maybe I'll describe what I need - I'd like to split input data vector into a few vectors (subspaces of features) and each of them is about to be classified separately (by same or different classifiers) and then output of all classifiers is to be combined (voted). Each subvector contains different columns (features) and a class label. As some classifiers return also a support function it could also be taken into consideration during voting.

Other task is to classify the same data using different classifiers and then combine their output (this can be done by the WEKA Vote node as I understand).

If you can create PMML models you can you the PMML ensemble functionality added into KNIME 2.8. 

 

I've been able to use this successfully for taking a severely imbalanced dataset and building a random forest. Sample the data, build 1 random tree and add to the table -> repeat x times.

 

The trees are then combined into a PMML ensemble and this is used to predict the new data. 

 

I believe you could do something similar.

 

Cheers

 

Sam

I'm not sure if we understand each other, I'll try to explain this in the other way.

Let's assume that we have 2 classes, let's call them F1..F2 and 3 classifiers, let's call them A..C, so combined row contains the following: RowID, F1_A, F2_A, F1_B, F2_B, F1_C, F2_C, TrueClass. Now I want to create (for each row) 2 more columns: F1=SUM(F1_A, F1_B, F1_C), F2=SUM(..), then add one more column containing the name of the previously calculated column which holds the largest value (Winner=MAX(F1, F2)). Each of Fn_m is 0..1, and F1_m + F2_m = 1.

Oh, I thought you were making the predictions in knime rather than working on 3 columns of predicted values. I believe the weka vote node will build the models you specify and you then use the weka predictor to make a prediction on new strcutures. The PMML ensemble would also work this way. 

 

If you want to get the values in the columns and come up with a new value I'm not sure which node you would use. I'd probably use a Java Snippet myself. 

 

There may be a node I'm not aware of that can do what you are after easily though.

 

Cheers

 

Sam

 

 

I've finally done it with a Java snippet...

out_F1 = c_F1_B+c_F1_E+c_F1_R+c_F1_S;
out_F2 = c_F2_B+c_F2_E+c_F2_R+c_F2_S;
out_F3 = c_F3_B+c_F3_E+c_F3_R+c_F3_S;
out_F4 = c_F4_B+c_F4_E+c_F4_R+c_F4_S;

  if (out_F1>=out_F2 & out_F1>=out_F3 & out_F1>=out_F4) {
    out_Winner  = "F1";
  } else if (out_F2>=out_F3 & out_F2>=out_F4) {
    out_Winner  = "F2";
  } else if (out_F3>=out_F4) {
    out_Winner  = "F3";
  } else {
    out_Winner  = "F4";
  }

 

You can also use the Rule Engine nodes for this.