Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
intersection = self._intersect_counters(*sequences) # set
sequences = (self._count_counters(sequence - intersection) for sequence in sequences)
# ^ ints
return max(sequences)
bag = Bag()
cosine = Cosine()
dice = Sorensen()
jaccard = Jaccard()
monge_elkan = MongeElkan()
overlap = Overlap()
sorensen = Sorensen()
sorensen_dice = Sorensen()
# sorensen_dice = Tversky(ks=[.5, .5])
tanimoto = Tanimoto()
tversky = Tversky()
def __call__(self, *sequences):
result = super(Tanimoto, self).__call__(*sequences)
if result == 0:
return float('-inf')
else:
return log(result, 2)