Algorithm to infer tag hierarchy
- by Tom
I'm looking for an algorithm to infer a hierarchy from a set of tagged items.
E.g. if the following items have the tags:
1 a
2 a,b
3 a,c
4 a,c,e
5 a,b
6 a,c
7 d
8 d,f
Then I can construct an undirected graph (or graphs) by tallying the node weights and edge weights:
node weights edge weights
a 6 a-b 2
b 2 a-c 3
c 3 …