Last active
January 19, 2022 10:14
-
-
Save sh16ma/109f0f74071a9389a4b1b2762c2ab8e2 to your computer and use it in GitHub Desktop.
#🐍 #Python #EDA #ストライプ図 #バイオリン図 #箱ひげ図
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
''' | |
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() |
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