1. 首页
  2. 编程语言
  3. Python
  4. 使用决策树和随机森林预测员工的离职率帮助人事部门理解一个员工为何离职预测一个员工离职的可能性

使用决策树和随机森林预测员工的离职率帮助人事部门理解一个员工为何离职预测一个员工离职的可能性

上传者: 2023-01-19 06:43:35上传 ZIP文件 253.12KB 热度 11次
使用决策树和随机森林预测员工的离职率python帮助人事部门理解一个员工为何离职预测一个员工离职的可能性.画出决策树的特征的重要性importances dtree.feature importancesprint importancesprint np.argsort importances1feat names df.drop turnover axis1.columns indices np.argsort importances1argsort返回的是数据从小到大的索引值plt.figure figsize126plt.titleFeature importances by Decision Tree plt.bar range len indicesimportances indices colorlightblue aligncenter plt.step range len indicesnp.cum
下载地址
用户评论