Created
January 19, 2017 22:00
-
-
Save Wann-Jiun/f98a8990418eb378b5d4eca632ea0d1c to your computer and use it in GitHub Desktop.
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
from scipy.stats import skew | |
skewed_features = train_df[numerical_features].apply(lambda x: skew(x.dropna().astype(float))) | |
skewed_features = skewed_features[skewed_features > 0.75] | |
skewed_features = skewed_features.index | |
train_df[skewed_features] = np.log1p(train_df[skewed_features]) | |
test_df[skewed_features] = np.log1p(test_df[skewed_features]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment