Skip to content

Instantly share code, notes, and snippets.

@joseph-allen
Created December 29, 2017 14:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save joseph-allen/feedab3228497ebbaebd15cdc059b818 to your computer and use it in GitHub Desktop.
Save joseph-allen/feedab3228497ebbaebd15cdc059b818 to your computer and use it in GitHub Desktop.
skewness
import seaborn as sns
g = sns.distplot(dataset["Feature"], color="m", label="Skewness : %.2f"%(dataset["Feature"].skew()))
g = g.legend(loc="best")
# Apply log to Feature to reduce skewness distribution
# dataset["Feature"] = dataset["Feature"].map(lambda i: np.log(i) if i > 0 else 0)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment