Hi,
I’m struggeling a bit with getting a list comparison done.
I found following post pretty helpful, but finally i can’t apply it on my problem to get it running. Comparing Lists
I need to compare n:n numbers of list, and not just against one “master”.
As an example, i just typed in excel to make clear what i try to achieve for an large data set.
I would like to answer the questions:
A) Which recipe compositions are the same. (Order doesnt matter)
B) Which recipe is a subset of another recipe. = Has the same ingredients, but not all of it compared to another recipe. (Order doesnt matter)
For both questions i need to find out which apple cake recipes are related to each other.
E.g.
Recipe 20000000000: is equal to 20000000003
and is a subset of Recipe 20000000001 (As 20000000001 contains one more Ingredient 1000011205)
The following workflow is a possible solution among others:
In this solution, in order to compare recipes made of materials, one needs first to create a set of materials per recipe (-Column Aggregator- node) and then compare the sets of materials for all the pairs of recipes (-Cross Joiner- node).
A way of calculating the inclusion of a set of materials against another set of materials is by checking whether the string of one is LIKE the string of the other one, where the second one is the one that “is included”. For instance:
"A B C" is LIKE "*A*C*". The following workflow is using this trick to check for inclusion of recipes
$ID$ = $ID (#1)$ => "Set and Set (#1) are the same"
$Set$ LIKE $Set (#1)$ AND $Set Size$ = $Set Size (#1)$ => "Set (#1) Subset are equivalent"
$Set$ LIKE $Set (#1)$ => "Set (#1) is a Subset of Set"
TRUE => "There is Not subset"