kg_topology_toolbox.utils.jaccard_similarity

kg_topology_toolbox.utils.jaccard_similarity(entities_1, entities_2)[source]

Jaccard Similarity function for two sets of entities.

Parameters:
  • entities_1 (ndarray[Any, dtype[int32]]) – Array of IDs for the first set of entities.

  • entities_2 (ndarray[Any, dtype[int32]]) – Array of IDs for the second set of entities.

Return type:

float

Returns:

Jaccard Similarity score for two sets of entities.