Skip to content

Instantly share code, notes, and snippets.

@JacobBumgarner
Last active January 10, 2023 18:04
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save JacobBumgarner/48cdb6c374d14dac83c5a933baac267f to your computer and use it in GitHub Desktop.
Save JacobBumgarner/48cdb6c374d14dac83c5a933baac267f to your computer and use it in GitHub Desktop.
import seaborn as sns
# Create a FacetGrid with SNS for a rough visualization
long_df = pd.melt(df, df.columns[-1], df.columns[:-1], var_name="feature")
g = sns.FacetGrid(long_df, col="feature", hue="target",
sharex=False, sharey=False, col_wrap=5, )
# palette="flare")
g.map(sns.kdeplot, "value", shade=True)
plt.legend(labels=["Healthy", "Disease"], loc="upper left")
plt.show()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment