Skip to content

Commit

Permalink
use containment instead of similarity
Browse files Browse the repository at this point in the history
  • Loading branch information
luizirber committed Jan 4, 2019
1 parent 82f50de commit ae0ea4a
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions sourmash/sbtmh.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,10 +106,8 @@ def _max_jaccard_underneath_internal_node(node, query):
if min_n_below == -1:
raise Exception('cannot do similarity search on this SBT; need to rebuild.')

score = node.data.similarity(query_bf)

# count the maximum number of hash matches beneath this node
matches = score * len(query.minhash)
matches = query_bf.containment(node.data) * len(query.minhash)

# max of numerator divided by min of denominator => max Jaccard
max_score = matches / min_n_below
Expand Down

0 comments on commit ae0ea4a

Please sign in to comment.