Skip to content

Commit

Permalink
weighted hash err
Browse files Browse the repository at this point in the history
  • Loading branch information
cactuskid committed Aug 30, 2024
1 parent e5b3ee7 commit 7b713bd
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/HogProf/lshbuilder.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,8 @@ def __init__(self,h5_oma=None,fileglob = None, taxa=None,masterTree=None, saving
else:
#load machine learning weights
self.treeweights = treeweights
wmg = WeightedMinHashGenerator(3*len(self.taxaIndex), sample_size = numperm , seed=1)
tax_max = max(self.taxaIndex.values())+1
wmg = WeightedMinHashGenerator(3*tax_max, sample_size = numperm , seed=1)
with open( self.saving_path + 'wmg.pkl', 'wb') as wmgout:
wmgout.write( pickle.dumps(wmg))
self.wmg = wmg
Expand Down

0 comments on commit 7b713bd

Please sign in to comment.