Skip to content

Instantly share code, notes, and snippets.

@sh16ma
Last active January 19, 2022 10:14
Show Gist options
  • Save sh16ma/109f0f74071a9389a4b1b2762c2ab8e2 to your computer and use it in GitHub Desktop.
Save sh16ma/109f0f74071a9389a4b1b2762c2ab8e2 to your computer and use it in GitHub Desktop.
#🐍 #Python #EDA #ストライプ図 #バイオリン図 #箱ひげ図
'''
seabornでの描画:ストライプ図、バイオリン図、箱ひげ図
'''
import matplotlib.pyplot as plt
import seaborn as sns
def plots(x, y):
'''
x 特徴量、 y 目的変数
'''
fig, ax = plt.subplots(1, 3, figsize=(20, 8))
sns.stripplot(data=df, x=x, y=y, ax=ax[0])
sns.violinplot(data=df, x=x, y=y, ax=ax[1])
sns.boxplot(data=df, x=x, y=y, ax=ax[2])
plt.show()
@sh16ma
Copy link
Author

sh16ma commented Jan 26, 2021

plots()

@sh16ma
Copy link
Author

sh16ma commented Jan 26, 2021

memo

ヒートマップで相関の高い特徴量探索後にEDA目的で用いる

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment