Java 数字属性决策树课程
我正在寻找一个用于决策树的java库,它接受数字属性和类/等级。 Weka 的 J48 处理离散属性,但不接受数字属性。
谢谢
I'm looking for a java library for decision trees which accepts numeric attributes and classes/grades. Weka's J48 deals with discrete attributes but doesn't accept numeric ones.
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
事实并非如此,Weka 的 J48 (C4.5) 确实支持数字属性。这是与 ID3 算法(除其他外)的主要区别
编辑:
看起来你是指的是数字输出类而不是数字输入属性。
在本例中,您正在寻找模型/回归树。 Weka 有一个由 R 实现的 M5 算法。 Quinlan(最初为离散类引入 C4.5 算法的同一个人)在weka.classifiers.trees.M5P。该算法与通常的 C4.5 类似,只是它使用标准差而不是熵,而且叶节点包含回归模型(或简单的平均值)。
Not true, Weka's J48 (a variation of C4.5) does support numeric attributes. This is the main difference from the ID3 algorithm (among other things)
EDIT:
It appears you were referring to numeric output class rather than numeric input attributes.
In this case, you are looking for model/regression trees. Weka has an implementation of the M5 algorithm by R. Quinlan (the same guy who originally introduced the C4.5 algorithm for discrete classes) in weka.classifiers.trees.M5P. The algorithm is similar to the usual C4.5 except it uses standard deviation instead of entropy, also the leaf nodes contain a regression model (or simply the mean).