From e0419b22a9429c6b64517ee4c809b1c40b9acd02 Mon Sep 17 00:00:00 2001 From: knc6 Date: Tue, 19 Mar 2024 23:29:01 -0400 Subject: [PATCH] Fix OneHotEncoder. --- jarvis/core/specie.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/jarvis/core/specie.py b/jarvis/core/specie.py index 93a36c8d..d3d898c5 100644 --- a/jarvis/core/specie.py +++ b/jarvis/core/specie.py @@ -418,7 +418,8 @@ def get_digitized_feats_hot_encoded( from sklearn.preprocessing import OneHotEncoder import pandas as pd - encoder = OneHotEncoder(categories="auto", sparse=False) + encoder = OneHotEncoder(categories="auto", sparse_output=False) + # encoder = OneHotEncoder(categories="auto", sparse=False) dat = defaultdict() for i, j in chem_data.items(): tmp = defaultdict() @@ -458,7 +459,8 @@ def get_feats_hot_encoded(feature_names=keys, filename="feats_encoded.json"): from sklearn.preprocessing import OneHotEncoder import pandas as pd - encoder = OneHotEncoder(categories="auto", sparse=False) + encoder = OneHotEncoder(categories="auto", sparse_output=False) + # encoder = OneHotEncoder(categories="auto", sparse=False) dat = {} for i, j in chem_data.items(): tmp = []