Created
January 10, 2020 20:36
-
-
Save marcosan93/54d6f7046a35a6059d00c2a97332630f to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| # Correlation DF of all classes | |
| corr = final_df.corr().iloc[[-1],:-1] | |
| # Sorting our Correlation DF by their absolute values and selecting the top 10 | |
| top10_corr = corr.transpose().apply(abs).sort_values(by='Decision', ascending=False)[:10] | |
| # Creating a new DF with the features from the top10_corr and joing the 'Decision' class labels | |
| top10_corr_df = final_df[top10_corr.index].join(final_df.Decision) | |
| # Pickling the DF for use in our Classification models | |
| with open("top10_corr_df.pkl", "wb") as fp: | |
| pickle.dump(top10_corr_df, fp) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment