From 3b82fe63069884882e743af725d29cc2a67859f1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pierre-Fran=C3=A7ois=20Gimenez?= Date: Fri, 21 Jul 2023 14:31:08 +0200 Subject: [PATCH] =?UTF-8?q?FeatureHasher=E2=80=99s=20transform=20expects?= =?UTF-8?q?=20a=20list=20of=20list=20of=20strings,=20not=20a=20list=20of?= =?UTF-8?q?=20strings?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ember/features.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ember/features.py b/ember/features.py index bbaa1381..71321315 100644 --- a/ember/features.py +++ b/ember/features.py @@ -189,7 +189,7 @@ def process_raw_features(self, raw_obj): section_entropy_hashed = FeatureHasher(50, input_type="pair").transform([section_entropy]).toarray()[0] section_vsize = [(s['name'], s['vsize']) for s in sections] section_vsize_hashed = FeatureHasher(50, input_type="pair").transform([section_vsize]).toarray()[0] - entry_name_hashed = FeatureHasher(50, input_type="string").transform([raw_obj['entry']]).toarray()[0] + entry_name_hashed = FeatureHasher(50, input_type="string").transform([[raw_obj['entry']]]).toarray()[0] characteristics = [p for s in sections for p in s['props'] if s['name'] == raw_obj['entry']] characteristics_hashed = FeatureHasher(50, input_type="string").transform([characteristics]).toarray()[0]