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
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章