Hello all,
I’m new here in the KNIME community and am trying my hand at gradually replacing Excel with KNIME. If this question is misplaced here, I apologize.
I find after days of research and thinking unfortunately no solution to a COUNTIF function over multiple columns or tables. Groupby or join alone have not helped me.
Here’s what I’m trying to do:
Table 1 (all words from table 2).
ID, Word
Flower
Windshield
Pear
Road
Tire
Grass
Cow
Gear
Plants
Animals
Table 2 (words themed; row 1 = topic)
There can be thousands of topics here!
nature,car
flower,windshield
Pear,road
Grass,tire
cow,gear
Plants,
Animals,
Now I would like to create the following table, which I would solve in Excel with Countif:
Table 3
ID, Word,Nature,Car
flower,1,0
windshield,0,1
Pear,1,0
road,0,1
Tire,0,1
Grass,1,0
Cow,1,0
Gear,0,1
Plants,1,0
Animals,1,0
Maybe the background will help a bit too, as this looks a bit abstract. I have a table with a good 10,000 entries (trainig data). In this table there are two columns
- Texts
- classification
The whole texts were once divided by hand into 9 classes. The texts are all of different length and very different. In principle I would like to train an algorithm on the basis of the appearing words that this makes the classification. For this I thought to write all words in own columns (for each entry). This would correspond then transposed the table 2 described above. Subsequently, I have created a table that contains all words, this corresponds to table 1. Now I hope that I can build a basis for a ML algorithm with the creation of table 3.