tanimoto cosine weighted tree similarity