Skip to content

Instantly share code, notes, and snippets.

@dradecic
Created September 1, 2019 16:06
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 dradecic/f8d32045aa886756f59adc1ca50eabd1 to your computer and use it in GitHub Desktop.
Save dradecic/f8d32045aa886756f59adc1ca50eabd1 to your computer and use it in GitHub Desktop.
rfecv_3_correlations
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)
@royinblr
Copy link

It would be great if the column names inside correlated_features can be viewed.Is there any way to do so please?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment