You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The semantic_similarity function produces division by zero error for same term pair. It might be fixed as below;
def semantic_similarity(go_id1, go_id2, godag, branch_dist=None):
'''
Finds the semantic similarity (inverse of the semantic distance)
between two GO terms.
'''
dist = semantic_distance(go_id1, go_id2, godag, branch_dist)
if dist == 0:
return 1
if dist is not None:
return 1.0 / float(dist)
return None
The text was updated successfully, but these errors were encountered:
The semantic_similarity function produces division by zero error for same term pair. It might be fixed as below;
The text was updated successfully, but these errors were encountered: