Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
pplonski committed Sep 21, 2020
2 parents f04c78e + 07f5255 commit d18e411
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions supervised/preprocessing/eda.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand All @@ -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)
Expand Down Expand Up @@ -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:
Expand Down

0 comments on commit d18e411

Please sign in to comment.