Created
September 1, 2019 16:41
-
-
Save dradecic/4bc8f929a86795c0d9c5e663293cd71f to your computer and use it in GitHub Desktop.
rfecv_7_imporance_plotting
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
dset = pd.DataFrame() | |
dset['attr'] = X.columns | |
dset['importance'] = rfecv.estimator_.feature_importances_ | |
dset = dset.sort_values(by='importance', ascending=False) | |
plt.figure(figsize=(16, 14)) | |
plt.barh(y=dset['attr'], width=dset['importance'], color='#1976D2') | |
plt.title('RFECV - Feature Importances', fontsize=20, fontweight='bold', pad=20) | |
plt.xlabel('Importance', fontsize=14, labelpad=20) | |
plt.show() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment