【发布时间】:2019-03-13 22:25:13
【问题描述】:
我基于此在我的数据框中进行了特征选择: https://towardsdatascience.com/feature-selection-using-random-forest-26d7b747597f
在第 7 部分,用于绘制重要性分布,提供了以下代码:
pd.series(sel.estimator_,feature_importances_,.ravel()).hist()
我认为没有语法错误应该是这样的:
pd.series(sel.estimator_,feature_importances_.ravel()).hist()
我收到了这个错误:
AttributeError: 模块 'pandas' 没有属性 'series'
【问题讨论】:
标签: python matplotlib plot random-forest