From d550320da9456f29ee34a98095ebdc7afd025ae0 Mon Sep 17 00:00:00 2001 From: cactuskid Date: Fri, 30 Aug 2024 15:22:28 +0200 Subject: [PATCH] input vec --- src/HogProf/lshbuilder.py | 2 +- src/HogProf/utils/hashutils.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/HogProf/lshbuilder.py b/src/HogProf/lshbuilder.py index 7fd7c5a..3063415 100755 --- a/src/HogProf/lshbuilder.py +++ b/src/HogProf/lshbuilder.py @@ -148,7 +148,7 @@ def __init__(self,h5_oma=None,fileglob = None, taxa=None,masterTree=None, saving #load machine learning weights self.treeweights = treeweights tax_max = max(self.taxaIndex.values())+1 - wmg = WeightedMinHashGenerator(3*tax_max, sample_size = numperm , seed=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 diff --git a/src/HogProf/utils/hashutils.py b/src/HogProf/utils/hashutils.py index 6e772ba..38c24ba 100755 --- a/src/HogProf/utils/hashutils.py +++ b/src/HogProf/utils/hashutils.py @@ -85,7 +85,7 @@ def hash_tree(tp , taxaIndex , treeweights , wmg , lossonly = False , duplonly = input_vec = list(hog_matrix_weighted.flatten()) if wmg.dim == len(input_vec): - weighted_hash = wmg.minhash() + weighted_hash = wmg.minhash(input_vec) return hog_matrix_binary , weighted_hash else: