資源簡介
相當全的matlab的隨機森林代碼,有主程序和例子,部分64位的機器可能運行不了。需要的可以下載下,大家可以交流交流啊,

代碼片段和文件信息
function?printRF(out)
%!
%!?Description:
%!
%!???Print?summary?for?output?object?returned?from?RFReg?and?RFClass.
%!?
%!?Usage:
%!
%!???out?=?RFReg(param?x?y);
%!???PrintRF(out);
%!
%!?Arguments:
%!
%!???out??????An?output?object?returned?from?RFReg?or?RFClass.
%!
%
%?Last?update?on?Jun.?27?2003
%?By?Ting?Wang???Merck?&?Co.
%
??nm?=?fieldnames(out);
??for?i=1:length(nm)????%?Print?parameter?settings
????if?strcmp(nm(i)‘param‘)
???????disp(‘?‘);
???????disp([‘??Number?of?Trees:?‘num2str(out.param(1))]);
???????disp([‘??No.?of?Variables?tried?at?each?split:?‘?...
???????????????num2str(out.param(2))]);
????end;
??end;
??for?i=1:length(nm)????%?Print?error?rate?for?training/test?set
????if?strcmp(nm(i)‘errtr‘)
???????disp([‘??OOB?estimate?error?rate?for?training?data:?‘?...
??????????sprintf(‘%6.4f‘out.errtr(end))‘%‘]);??????
????end;
????if?strcmp(nm(i)‘errts‘)
???????disp([‘??OOB?estimate?error?rate?for?test?data:?‘?...
??????????sprintf(‘%6.4f‘out.errts(end))‘%‘]);??????
????end;
??end;
??for?i=1:length(nm)????%?Print?confusion?matrix?for?training/test?set
????if?strcmp(nm(i)‘mtab‘)
???????disp(‘?‘);
???????disp([‘????????Confusion?Matrix?For?Training?Set‘]);
???????k=size(out.mtab1);
???????disp([‘???????|‘sprintf(‘%6.0f‘(1:k))‘?|???err?%‘]);
???????disp([‘??-----|‘repmat([‘-‘]16*k)???‘-|---------‘]);
???????for?i=1:k
??????????s=sum(out.mtab(i:));
??????????if?s>0?err=100*(1-out.mtab(ii)/s);
??????????else???err=NaN;?end;
???????disp([sprintf(‘%6.0f‘i)‘?|‘?...
????????????sprintf(‘%6.0f‘out.mtab(i:))?‘?|‘?...
????????????sprintf(‘%9.4f‘err)]);
???????end;
????end;
????if?strcmp(nm(i)‘mtabts‘)
???????disp(‘?‘);??????
???????disp([‘????????Confusion?Matrix?For?Test?Set‘]);
???????k=size(out.mtabts1);
???????disp([‘???????|‘sprintf(‘%6.0f‘(1:k))‘?|???err?%‘]);
???????disp([‘??-----|‘repmat([‘-‘]16*k)???‘-|---------‘]);
???????for?i=1:k
??????????s=sum(out.mtabts(i:));
??????????if?s>0?err=100*(1-out.mtabts(ii)/s);
??????????else???err=NaN;?end;
???????disp([sprintf(‘%6.0f‘i)‘?|‘?...
????????????sprintf(‘%6.0f‘out.mtabts(i:))?‘?|‘?...
????????????sprintf(‘%9.4f‘err)]);
???????end;
????end;
??end;
??disp(‘?‘);
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件??????215904??2004-12-14?15:04??Random?Forest?Matlab?Version\RandomForest.zip
?????文件???????36864??2003-08-21?12:42??Random?Forest?Matlab?Version\RFRegression.dll
?????目錄???????????0??2004-12-14?15:07??Random?Forest?Matlab?Version\Examples\
?????文件???????32726??2002-08-21?16:07??Random?Forest?Matlab?Version\Examples\boshouse.txt
?????文件????????1194??2003-06-25?09:22??Random?Forest?Matlab?Version\Examples\Example_Classification.m
?????文件????????1145??2003-03-03?11:51??Random?Forest?Matlab?Version\Examples\Example_Regression.m
?????文件??????236745??2002-08-21?16:06??Random?Forest?Matlab?Version\Examples\satimage_tes.txt
?????文件??????525830??2002-08-21?16:06??Random?Forest?Matlab?Version\Examples\satimage_tra.txt
?????文件???????12564??2004-12-14?15:08??Random?Forest?Matlab?Version\Examples\RFClass.m
?????文件???????57344??2004-12-14?15:08??Random?Forest?Matlab?Version\Examples\RFClassification.dll
?????文件????????2276??2004-12-14?15:08??Random?Forest?Matlab?Version\Examples\PrintRF.m
?????目錄???????????0??2004-12-14?15:07??Random?Forest?Matlab?Version\Fortran\
?????文件???????60909??2003-06-27?13:11??Random?Forest?Matlab?Version\Fortran\RFClassification.f
?????文件???????24632??2003-06-30?12:08??Random?Forest?Matlab?Version\Fortran\RFRegression.f
?????文件???????97280??2003-09-15?10:55??Random?Forest?Matlab?Version\Installation.doc
?????文件???????12564??2003-06-25?10:16??Random?Forest?Matlab?Version\RFClass.m
?????文件????????2276??2003-06-27?16:02??Random?Forest?Matlab?Version\PrintRF.m
?????文件????????7959??2003-06-30?11:47??Random?Forest?Matlab?Version\RFReg.m
?????文件???????57344??2003-08-21?12:42??Random?Forest?Matlab?Version\RFClassification.dll
?????文件?????????847??2003-09-15?11:11??Random?Forest?Matlab?Version\ReadMe
?????文件??????361769??1998-07-21?04:07??Random?Forest?Matlab?Version\bootman.ps
?????目錄???????????0??2004-12-14?15:06??Random?Forest?Matlab?Version\
評論
共有 條評論