A program to recognize and reward our most engaged community members
import com.rapidminer.tools.Ontology;//imports----------------------------------------------------------------------ExampleSet ASet = operator.getInput(ExampleSet.class, 0) //(n x f)ExampleSet BSet = operator.getInput(ExampleSet.class, 1) // (f x m) ExampleSet resultSet = operator.getInput(ExampleSet.class, 2) // (n x m)//init----------------------------------------------------------------------------Integer m = operator.getProcess().macroHandler.getMacro("m").toInteger();Integer n = operator.getProcess().macroHandler.getMacro("n").toInteger();Integer f = operator.getProcess().macroHandler.getMacro("f").toInteger();Integer i = 0Integer j = 0Integer k = 0//save attributes name into array-------------------------------------------String[] ASetAttributes = new String;j = 0for (Attribute attribute : ASet.getAttributes()) { ASetAttributes = attribute.getName(); j = j+1}String[] userSetAttributes = new String;j = 0for (Attribute attribute : BSet.getAttributes()) { BSetAttributes = attribute.getName(); j = j+1}//table and exampleset------------------------------------------------------Integer a = 0iInteger b = 0iInteger c = 0ifor (i = 0; i < (n-1); i++){ for (j = 0; j < (m-1); j++) { for(k = 0; k < (f-1); k++){ //resultant += a * b; AAtt = ASetAttributes.toString(); BAtt = BSetAttributes.toString(); resultAtt = BSetAttributes.toString(); if(AAtt!="idA" && BAtt!="idB"){ a = (Integer)(ASet.getExample(i)[AAtt]); b = (Integer)(BSet.getExample(k)[BAtt]); c = (Integer) (resultSet.getExample(i)[resultAtt]) resultSet.getExample(i)[resultAtt] = (Integer)(c+a*b); } } }}return resultSet