Jan-18-2023, 05:44 PM
I thought of modifying the code that I posted. to something like this:
Any help appreciated.
Respectfully,
Led_Zeppilin
import pandas as pd import matplotlib.pyplot as plt # Load the data data = ext.sort.values(['extratrees'], ascending=True) # Extract the feature names and importance values feature_names = range(0,51) importances = data[0] # Plot the data plt.figure(figsize=(10, 5)) plt.title("Feature Importance") plt.bar(feature_names, importances) plt.xlabel("Sensor Index") plt.ylabel("Importance Value") plt.show()But that seems very awkward. So, I hope there is an easier way.
Any help appreciated.
Respectfully,
Led_Zeppilin