Created
September 23, 2019 23:10
-
-
Save oneryalcin/d3508692ca29dda29e02146fd08ff2d6 to your computer and use it in GitHub Desktop.
10 Sparkify Skew fix
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
f, axes = plt.subplots(2, 3, figsize=(14, 7), sharex=False) | |
sns.distplot( joined_pandas["sessionCount"] , color="skyblue", ax=axes[0, 0]) | |
sns.distplot( joined_pandas["meanSongCount"] , color="olive", ax=axes[0, 1]) | |
sns.distplot( joined_pandas["sessionsFreqDay"] , color="gold", ax=axes[0, 2]) | |
# Skew handling | |
sns.distplot( np.log(joined_pandas["sessionCount"]) , color="skyblue", ax=axes[1, 0]) | |
sns.distplot( np.sqrt(joined_pandas["meanSongCount"]) , color="olive", ax=axes[1, 1]) | |
sns.distplot( np.sqrt(joined_pandas["sessionsFreqDay"]) , color="gold", ax=axes[1, 2]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment