Given a taxonomy T , we first formally define the affinity between a category c and one of its ancestor category c in T as: where len is the length of the shortest path between the two categories and depth(T) denotes the depth of the taxonomy.
affinity is the complementary of the normalized path length between c and its ancestor c .