alis.similarity._jaccard.jaccard_sim#

alis.similarity._jaccard.jaccard_sim(characteristic_matrix, i, j)[source]#

Return the jaccard similarity of sets i and j given the characteristic matrix

Parameters
characteristic_matrixarr

Array of shape (num_items, num_sets) containing the characteristic matrix in which the Jaccard similarity is to be computed

iint

Index of set i

jint

Index of set j

Returns
simfloat

Jaccard similarity between the chosen sets i and j