Created
January 24, 2024 06:29
-
-
Save wibowotangara/c52e1d3b9e7bcec5898832f1bb038d1d 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
df_top_features = df_all_features.head(10).sort_values(by='importance', ascending=True) | |
plt.figure(figsize=(10, 6)) | |
plt.barh(df_top_features['feature'], df_top_features['importance'], color='skyblue') | |
plt.xlabel('Importance') | |
plt.title('Top 10 Feature Importances') | |
for index, value in enumerate(df_top_features['importance']): | |
plt.text(value, index, f'{value:.4f}', va='center') | |
plt.show() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment