Return most occured word in each rows

Hi simon and others

thanks for your reply and i not looking for ''word'' is mostly occured in whole table. Node should look only first row and report most occured word, then it goes to sencond row check similary and report word. So at the final, New column should have most occured word in each rows.

I have 1000 rows (chemicals) and 5 columns (5-methods predictions). I like to have 6-th column with most occured word ('yes' or 'no') for each 1000 rows.

Best regards and i hope you have understood

Nathan

Hmm, abit more tricky.

You could try making a collection column of the 5 property columns (Data Man/Column/SplitCombine/Create Collection Column) and then use the GroupBy node by specifying the structure column in the top part of the config box and then in the bottom part of the screen choose the New Collection Column and for aggregation choose Intersection. That may do the trick.

 

Another alternative is to use the Transpose node, then use the GroupBy node with Mode as aggregate and then transpose back again.

 

Simon.

Thinking about it some more, a better way is to use the "One2Many" node on the 5 property columns with the Yes and No's present. Then use the Maths node to sum up the values for all the resultant "Yes" columns (which One2Many generated), i.e. Yes+Yes#1+Yes#2 etc. Then you can sort on this column in descending order which will put the most Yes's at the top, which might be a better thing for what you want.

Simon.

SORRY NOT WORKING

And you can then use Rule Engine node to say "IF Summed Column > 3" then outcome "YES", and "IF Summed Column <3" then outcome "NO" to give desired result.