-
-
Save sgsg704/313b9128299026659cf96a6a38ec1a20 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
features = data.drop(['RainTomorrow', 'Date','day', 'month'], axis=1) # dropping target and extra columns | |
target = data['RainTomorrow'] | |
#Set up a standard scaler for the features | |
col_names = list(features.columns) | |
s_scaler = preprocessing.StandardScaler() | |
features = s_scaler.fit_transform(features) | |
features = pd.DataFrame(features, columns=col_names) | |
features.describe().T | |
#Detecting outliers | |
#looking at the scaled features | |
colours = ["#D0DBEE", "#C2C4E2", "#EED4E5", "#D1E6DC", "#BDE2E2"] | |
plt.figure(figsize=(20,10)) | |
sns.boxenplot(data = features,palette = colours) | |
plt.xticks(rotation=90) | |
plt.show() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment