Model ensembling , Getting result based on majority for each record

Hello everyone,

I am quite new with KNIME. I recently took Data Mining course and my faculty gave me  project on "GERMAN DATA SET".
I want to make ensemble of models . I want to apply 3-4 algorithm as- LR, DT, SVM, MLP.  and then ensemble their result .  Means I want to take result that have majority.(means if for a record LR give 1 , DT - 1 ,  SVM - 2 , MLP -1 then it choose 1 as a result for that particular record.)

And apply this for all records. Research papers say it will improve the accuracy

I invsted many hours to find the way but i could not.  Please help me how to generate such a model?

Under Mining/ensemble category, there is a prebuilt metanode called "Bagging" which will do model majority voting. However, this is limited to one type of model at a time, i.e. Decision Trees only.

If you wish to do what you mention, why not generate each model results individually so you have a series of column outputs, i.e. LR Prediction, DT Prediction, SVM Prediction etc. You can then use the "Column Aggregator" node to get a majority voting. Select the Prediction columns from the model outputs, and in the Aggregate Options tab, choose Mode. This will now select the majority vote from the models. This is now effectively an Ensemble Model.!!

Does this work for you.



The PMML ensemble is pretty useful for this type of thing too. If you can get a PMML model output from the learner you can put it into an ensemble model that can then be used to predict

Dear Richard:

I was searching in KNIME the prebuilt metanode called "Bagging" but it was impossible to find it. In Weka there is a node called "Bagging" but the node does not appear as you mention. On the other hand I was looking in EXAMPLES as well and there is nothing like. Could you be more specific as to where to find it?





Thank you, Richards, your comment helped me a lot.


There is a node called Voting Loop End that can be connected for to identify the winner based on majority voting.

1 Like