From cd88a9660a64f6115f27065a52551ca9fa8dd35e Mon Sep 17 00:00:00 2001 From: Steve Nyemba Date: Thu, 20 Feb 2020 22:37:25 -0600 Subject: [PATCH] bug fix , generator --- data/gan.py | 1 + data/maker/__init__.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/data/gan.py b/data/gan.py index fd30070..2083f69 100644 --- a/data/gan.py +++ b/data/gan.py @@ -581,6 +581,7 @@ class Predict(GNet): # # In case we are dealing with actual values like diagnosis codes we can perform # + df = found[np.random.choice(np.arange(len(found)),1)[0]] columns = self.ATTRIBUTES['synthetic'] if isinstance(self.ATTRIBUTES['synthetic'],list)else [self.ATTRIBUTES['synthetic']] diff --git a/data/maker/__init__.py b/data/maker/__init__.py index cbd1ea9..3c04b57 100644 --- a/data/maker/__init__.py +++ b/data/maker/__init__.py @@ -38,7 +38,7 @@ def train (**args) : # args['label'] = handler.Export(df[[column_id]]) # args['label'] = np.ones(df.shape[0]).reshape(df.shape[0],1) for col in column : - args['real'] = pd.get_dummies(df[col]).astype(np.float32).values + args['real'] = pd.get_dummies(df[col].fillna('')).astype(np.float32).values # args['real'] = handler.Export(df[[col]]) args['column'] = col args['context'] = col