ModuleNotFoundError: No module named 'yellowbrick.features.importances'
报错:ModuleNotFoundError: No module named 'yellowbrick.features.importances'
改为:
from yellowbrick.features import FeatureImportances
from sklearn.ensemble import GradientBoostingClassifier from yellowbrick.features import FeatureImportances # Create a new matplotlib figure fig = plt.figure() ax = fig.add_subplot() viz = FeatureImportances(GradientBoostingClassifier(), ax=ax) viz.fit(X, y) viz.poof()
https://www.scikit-yb.org/zh/latest/api/features/importances.html