Created
January 24, 2024 06:26
-
-
Save wibowotangara/f1a89e2acb23ed5980840e47a4d24b6b 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
arr_feature_importances = rfc.feature_importances_ | |
arr_feature_names = X_train.columns.values | |
df_feature_importance = pd.DataFrame(index=range(len(arr_feature_importances)), columns=['feature', 'importance']) | |
df_feature_importance['feature'] = arr_feature_names | |
df_feature_importance['importance'] = arr_feature_importances | |
df_all_features = df_feature_importance.sort_values(by='importance', ascending=False) | |
df_all_features |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment