If genre labels are organised into a tree (Figure 1), one of the simplest ways to measure distance between two genre labels (= tree nodes) is path length (h(a, b) plen ): where a and b are two nodes in the tree, LCS(a, b) is their Least Common Subsumer, and f (a, LCS(a, b)) is the number of levels passed through when traversing from a to the ancestral node LCS(a, b).
the distance counts the number of edges traversed from nodes a to b in the tree.