Comment tracer la caractéristique importante de tout modèle en python
#Feature importance from any model can be plotted as follows:
importances = model.feature_importances_
idxs = np.argsort(importances)
plt.title('Feature Importances')
plt.barh(range(len(idxs)), importances[idxs], align='center')
plt.yticks(range(len(idxs)), [col_names[i] for i in idxs])
plt.xlabel('Model name Feature Importance')
plt.show()
DON-PECH