-
大小: 4KB文件類型: .rar金幣: 1下載: 0 次發(fā)布日期: 2021-01-10
- 語言: Matlab
- 標(biāo)簽: C4.5??數(shù)據(jù)挖掘??
資源簡介
很詳細(xì)的代碼,利用matlab進(jìn)行編寫的C4.5算法,可以得出清晰的結(jié)果哦!
代碼片段和文件信息
%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
評論
共有 條評論