From 842225e3297ecacd3b7cbccee00503e11cded8bf Mon Sep 17 00:00:00 2001 From: Shahul E S Date: Fri, 18 Sep 2020 16:24:06 +0530 Subject: [PATCH 1/2] :bug: fix EDA --- supervised/preprocessing/eda.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/supervised/preprocessing/eda.py b/supervised/preprocessing/eda.py index f1644690..1d6c22e5 100644 --- a/supervised/preprocessing/eda.py +++ b/supervised/preprocessing/eda.py @@ -93,7 +93,7 @@ def compute(X, y, eda_path): for col in X.columns: inform["feature_type"].append(PreprocessingUtils.get_type(X[col])) - if PreprocessingUtils.get_type(X[col]) in ("categorical", "discrete"): + if PreprocessingUtils.get_type(X[col]) in ("categorical"): plt.figure(figsize=(5, 5)) chart = sns.countplot( @@ -103,7 +103,7 @@ def compute(X, y, eda_path): plt.title(f"{col} class distribution") plt.tight_layout(pad=2.0) - elif PreprocessingUtils.get_type(X[col]) in ("continous"): + elif PreprocessingUtils.get_type(X[col]) in ("continous","discrete"): plt.figure(figsize=(5, 5)) sns.distplot(X[col], color=BLUE) @@ -162,7 +162,7 @@ def compute(X, y, eda_path): f"- **{key.capitalize()}** :{row['desc'][key]}\n" ) - fout.write(f"- {row['plot']}\n") + fout.write(f"\n{row['plot']}\n") fout.close() except Exception as e: From 036fca486b08f18a053c09eba08eb12c949095e3 Mon Sep 17 00:00:00 2001 From: Shahul E S Date: Fri, 18 Sep 2020 16:24:06 +0530 Subject: [PATCH 2/2] :bug: fix EDA --- supervised/preprocessing/eda.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/supervised/preprocessing/eda.py b/supervised/preprocessing/eda.py index f1644690..1d6c22e5 100644 --- a/supervised/preprocessing/eda.py +++ b/supervised/preprocessing/eda.py @@ -93,7 +93,7 @@ def compute(X, y, eda_path): for col in X.columns: inform["feature_type"].append(PreprocessingUtils.get_type(X[col])) - if PreprocessingUtils.get_type(X[col]) in ("categorical", "discrete"): + if PreprocessingUtils.get_type(X[col]) in ("categorical"): plt.figure(figsize=(5, 5)) chart = sns.countplot( @@ -103,7 +103,7 @@ def compute(X, y, eda_path): plt.title(f"{col} class distribution") plt.tight_layout(pad=2.0) - elif PreprocessingUtils.get_type(X[col]) in ("continous"): + elif PreprocessingUtils.get_type(X[col]) in ("continous","discrete"): plt.figure(figsize=(5, 5)) sns.distplot(X[col], color=BLUE) @@ -162,7 +162,7 @@ def compute(X, y, eda_path): f"- **{key.capitalize()}** :{row['desc'][key]}\n" ) - fout.write(f"- {row['plot']}\n") + fout.write(f"\n{row['plot']}\n") fout.close() except Exception as e: