Matrix construction basis element occuring together

Hi all,

I have a column which looks like this:

Now I want to construct a similarity matrix which looks like this:


Image 2 is generated from image 1 by doing following steps:

  • split the cells of column basis ; symbol. After splitting, column 2 and column 3 will be created
  • append the values of column 2 and column 3 below column 1
  • remove blank cells and duplicate values
  • align the values horizontally and vertically as shown in image 2 along with similarity matrix, where e.g. value between A and B is 2 because they occurs twice together in image 1 and value between X and C is 1 because they occur only once together.

I hope my question is clear.
I want to know whether this is possible to do in Knime, if yes, any lead will be appreciated.

Thanks in advance!


Sure, why not:

Please Check the workflow and feel free to ask your questions:
matrix.knwf (45.1 KB)



Hi @armingrudd
Thanks a lot for your help. Provided workflow solved my problem :slight_smile: Thanks again

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.