r - c5.0() 如何选择决策和根节点?
问题描述
我正在学习机器学习的决策树方法。现在,我使用的最重要的一段代码是c5. 0
. 不得不承认,这是天才的作品。但我不明白它是如何选择根节点和决策节点的。示例:我有一个名为“credit”的数据库。这是前几列:
str(credit)
'data.frame': 1000 obs. of 21 variables:
$ checking_balance : Factor w/ 4 levels "< 0 DM","> 200 DM",..: 1 3 4 1 1 4 4 3 4 3 ...
$ months_loan_duration: int 6 48 12 42 24 36 24 36 12 30 ...
$ credit_history : Factor w/ 5 levels "critical","delayed",..: 1 5 1 5 2 5 5 5 5 1 ...
$ purpose : Factor w/ 10 levels "business","car (new)",..: 8 8 5 6 2 5 6 3 8 2 ...
$ amount : int 1169 5951 2096 7882 4870 9055 2835 6948 3059 5234 ...
所以当我在应用 c5.0 后查看决策树时,我看到根节点是$cheking balance
,那么下一个决策节点是$credit_history.
c5.0 创建决策树时遵循的策略或轨迹是什么?换句话说,它是如何确定决策节点的顺序的?
解决方案
有许多资源可以解释 c5.0 算法以及如何应用它,例如https://hub.packtpub.com/brett-lantz-on-implementing-a-decision-tree-using-c5-0- algorithm-in-r/ ; http://www.socr.umich.edu/people/dinov/courses/DSPA_notes/08_DecisionTreeClass.html;而且,我认为最好的资源是 Quinlan, J., 2014。C4。5:机器学习程序。爱思唯尔。如果你搜索你会找到你的答案。
推荐阅读
- sql - 在今天的两个时间之间生成时隙
- postgresql - Postgres JSONB 检索非常慢
- python - RuntimeError:b'在初始化列表中没有参数'(folium)
- java - 数据库架构的最佳方法主要集中在按年和按月同时存储不同字段的数据
- ansible - 如何修复 ansible uri 模块错误有超过 100 个标头?
- android - 有没有办法在进度条中放置分隔线?
- python-3.x - Django网站说“找不到页面(404)”
- qt - QT:从串口连续读取数据的问题
- c# - 查找子节点中所有计数属性的总和
- python - 使用 pandas read_csv 导入数据:带有两行错误的标题