资源简介
很详细的代码,利用matlab进行编写的C4.5算法,可以得出清晰的结果哦!
代码片段和文件信息
%C4_5TestFun.m
%Shiliang Sun (shiliangsun@gmail.com) Apr. 8 2007
%Using the learned 4.5 decision tree to classify samples
%This code is based on the C4_5.m file from “Classification Toolbox for Matlab“
%(http://www.yom-tov.info/cgi-bin/list_uploaded_files.pl). Several bugs have been fixed.
function targets = C4_5TestFun(patterns tree discrete_dim)
%Classify recursively using a tree
% patterns - Test patterns (the number of features) * (the number of samples)
indices = 1:size(patterns2);
targets = zeros(1 size(patterns2));
if (tree.dim == 0)
%Reached the end of the tree
targets(indices) = tree.child;
return
end
%This is not the last level of the tree so:
%First find the dimension we are to work on
dim = tree.dim;
dims= 1:size(patterns1);
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 1763 2007-04-09 10:40 c4.5matlab\C4_5TestFun.m
文件 4845 2007-04-09 10:40 c4.5matlab\C4_5TrainFun.m
文件 567 2007-04-09 10:41 c4.5matlab\DataForC45.m
文件 272 2007-04-09 10:41 c4.5matlab\DataForC45.mat
文件 2319 2008-12-07 11:01 c4.5matlab\UseC45.m
目录 0 2008-12-02 19:25 c4.5matlab
文件 218 2007-06-05 03:14 www.pudn.com.txt
----------- --------- ---------- ----- ----
9984 7
- 上一篇:半监督LFDA算法MATLAN代码
- 下一篇:矩量法一维导体散射计算
评论
共有 条评论