全部版块 我的主页
论坛 提问 悬赏 求职 新闻 读书 功能一区 经管百科 爱问频道
6712 3
2014-07-25
matlab里用什么函数或者方法显示C4.5算法得到的决策树图啊,麻烦大家帮忙解答下,急!!!
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

全部回复
2014-7-25 19:52:31
函数应该是没有的,MATLAB里的决策树用的似乎不是这个算法,至于如何实现,楼主可以自己写code或者找别人的code
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2014-7-25 20:06:02

(1*) C4.5 Syntax(用户自定义函数, 并非matlab自带函数):
predicted_targets = C4_5(training_patterns,training_targets, test_patterns, input parameter);
C4.5的matlab函数源代码, 可以参考Chapter 8 (记录在: Computer Manual in MatLab to accompany Pattern Classification工具箱的说明手册, 与 https://bbs.pinggu.org/thread-1087526-1-1.html),

(2) 画树图的指令可以用: dendrogram 或者 treeplot (语法可参考:
dendrogram: http://www.mathworks.com/help/stats/dendrogram.html#btk2sv9)
treeplot        :  http://www.mathworks.com/help/matlab/ref/treeplot.html?searchHighlight=treeplot

* Remark:
Function name: C4_5
Description:
Construct a decision tree recursively so as tominimize the error on a training set. Discrete features are split using
a histogram and continuous features are splitusing an information criteria. The algorithm is implemented under
the assumption that a pattern vector with fewerthan 10 unique values is discrete, and will be treated as such.
Other vectors are treated as continuous. Note thatdue to MATLAB memory and processing restrictions, the
recursion depth may be reached during theprocessing of a large complicated data set, which will result in an
error.

二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2014-7-26 08:09:41
mike68097 发表于 2014-7-25 20:06
(1*) C4.5 Syntax(用户自定义函数, 并非matlab自带函数):
predicted_targets = C4_5(training_patterns,tr ...
你好,我从网上找了代码也成功建了决策树,建树的函数(make_tree)代码就是网上找的,可是要怎么把它提取出来,然后显示呢,麻烦解答下好吗
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

相关推荐
栏目导航
热门文章
推荐文章

说点什么

分享

扫码加好友,拉您进群
各岗位、行业、专业交流群