Created
September 1, 2019 16:06
-
-
Save dradecic/f8d32045aa886756f59adc1ca50eabd1 to your computer and use it in GitHub Desktop.
rfecv_3_correlations
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
correlated_features = set() | |
correlation_matrix = data.drop('Survived', axis=1).corr() | |
for i in range(len(correlation_matrix.columns)): | |
for j in range(i): | |
if abs(correlation_matrix.iloc[i, j]) > 0.8: | |
colname = correlation_matrix.columns[i] | |
correlated_features.add(colname) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
It would be great if the column names inside correlated_features can be viewed.Is there any way to do so please?