資源簡介
主要是基于MATLAB的對圖像特征的分類隨機森林算法,想要更多MATLAB資源,聯(lián)系我謝謝支持

代碼片段和文件信息
%**************************************************************
%*?mex?interface?to?Andy?Liaw?et?al.‘s?C?code?(used?in?R?package?randomForest)
%*?Added?by?Abhishek?Jaiantilal?(?abhishek.jaiantilal@colorado.edu?)
%*?License:?GPLv2
%*?Version:?0.02
%
%?Calls?Classification?Random?Forest
%?A?wrapper?matlab?file?that?calls?the?mex?file
%?This?does?prediction?given?the?data?and?the?model?file
%?Options?depicted?in?predict?function?in?http://cran.r-project.org/web/packages/randomForest/randomForest.pdf
%**************************************************************
%function?[Y_hat?votes]?=?classRF_predict(Xmodel?extra_options)
%?requires?2?arguments
%?X:?data?matrix
%?model:?generated?via?classRF_train?function
%?extra_options.predict_all?=?predict_all?if?set?will?send?all?the?prediction.?
%
%
%?Returns
%?Y_hat?-?prediction?for?the?data
%?votes?-?unnormalized?weights?for?the?model
%?prediction_per_tree?-?per?tree?prediction.?the?returned?object?.
%???????????If?predict.all=TRUE?then?the?individual?component?of?the?returned?object?is?a?character
%???????????matrix?where?each?column?contains?the?predicted?class?by?a?tree?in?the?forest.
%
%
%?Not?yet?implemented
%?proximity
function?[Y_new?votes?prediction_per_tree]?=?classRF_predict(Xmodel?extra_options)
???tic;?
????if?nargin<2
error(‘need?atleast?2?parametersX?matrix?and?model‘);
????end
????
????if?exist(‘extra_options‘‘var‘)
????????if?isfield(extra_options‘predict_all‘)?
????????????predict_all?=?extra_options.predict_all;
????????end
????end
????
????if?~exist(‘predict_all‘‘var‘);?predict_all=0;end
????????????
????????
????
[Y_hatprediction_per_treevotes]?=?mexClassRF_predict(X‘model.nrnodesmodel.ntreemodel.xbestsplitmodel.classwtmodel.cutoffmodel.treemapmodel.nodestatusmodel.nodeclassmodel.bestvarmodel.ndbigtreemodel.nclass?predict_all);
%keyboard
????votes?=?votes‘;
????
????clear?mexClassRF_predict
????
????Y_new?=?double(Y_hat);
????new_labels?=?model.new_labels;
????orig_labels?=?model.orig_labels;
????
????for?i=1:length(orig_labels)
????????Y_new(find(Y_hat==new_labels(i)))=Inf;
????????Y_new(isinf(Y_new))=orig_labels(i);
????end
????
????1;
?????t?=?toc;
disp([mfilename?‘總的運行時間為‘?num2str(t)])
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????目錄???????????0??2017-05-27?22:15??18.對圖像特征的分類隨機森林算法\
?????文件?????????202??2011-05-28?23:40??18.對圖像特征的分類隨機森林算法\c.mat
?????文件????????2228??2011-08-14?01:40??18.對圖像特征的分類隨機森林算法\classRF_predict.m
?????文件???????14987??2011-08-14?00:02??18.對圖像特征的分類隨機森林算法\classRF_train.asv
?????文件???????14895??2011-08-14?00:24??18.對圖像特征的分類隨機森林算法\classRF_train.m
?????文件?????????856??2011-05-28?23:40??18.對圖像特征的分類隨機森林算法\Compile_Check
?????文件?????????557??2011-05-28?23:40??18.對圖像特征的分類隨機森林算法\compile_linux.m
?????文件????????1720??2011-05-28?23:40??18.對圖像特征的分類隨機森林算法\compile_windows.asv
?????文件????????1740??2011-05-28?23:40??18.對圖像特征的分類隨機森林算法\compile_windows.m
?????目錄???????????0??2017-05-27?22:15??18.對圖像特征的分類隨機森林算法\data\
?????文件???????48856??2011-05-28?23:40??18.對圖像特征的分類隨機森林算法\data\twonorm.mat
?????文件???????96300??2011-05-28?23:40??18.對圖像特征的分類隨機森林算法\data\X_twonorm.txt
?????文件?????????600??2011-05-28?23:40??18.對圖像特征的分類隨機森林算法\data\Y_twonorm.txt
?????文件??????283471??2011-05-29?16:18??18.對圖像特征的分類隨機森林算法\m.mat
?????文件????????2693??2011-05-28?23:40??18.對圖像特征的分類隨機森林算法\Makefile
?????文件????????2523??2011-05-28?23:40??18.對圖像特征的分類隨機森林算法\Makefile.windows
?????文件???????20992??2011-05-28?23:40??18.對圖像特征的分類隨機森林算法\mexClassRF_predict.mexw32
?????文件???????26624??2011-05-28?23:40??18.對圖像特征的分類隨機森林算法\mexClassRF_predict.mexw64
?????文件???????32256??2011-05-28?23:40??18.對圖像特征的分類隨機森林算法\mexClassRF_train.mexw32
?????文件???????46080??2011-05-28?23:40??18.對圖像特征的分類隨機森林算法\mexClassRF_train.mexw64
?????目錄???????????0??2017-05-27?22:15??18.對圖像特征的分類隨機森林算法\precompiled_rfsub\
?????目錄???????????0??2011-06-02?16:28??18.對圖像特征的分類隨機森林算法\precompiled_rfsub\linux64\
?????目錄???????????0??2017-05-27?22:15??18.對圖像特征的分類隨機森林算法\precompiled_rfsub\win32\
?????文件????????6848??2011-05-28?23:40??18.對圖像特征的分類隨機森林算法\precompiled_rfsub\win32\rfsub.o
?????目錄???????????0??2017-05-27?22:15??18.對圖像特征的分類隨機森林算法\precompiled_rfsub\win64\
?????文件????????9840??2011-05-28?23:40??18.對圖像特征的分類隨機森林算法\precompiled_rfsub\win64\rfsub.o
?????文件????????3255??2011-05-28?23:40??18.對圖像特征的分類隨機森林算法\README.txt
?????文件????????9840??2011-05-28?23:40??18.對圖像特征的分類隨機森林算法\rfsub.o
?????目錄???????????0??2017-05-27?22:15??18.對圖像特征的分類隨機森林算法\src\
?????文件???????33889??2011-05-28?23:40??18.對圖像特征的分類隨機森林算法\src\classRF.cpp
?????文件????????8947??2011-05-28?23:40??18.對圖像特征的分類隨機森林算法\src\classTree.cpp
............此處省略17個文件信息
評論
共有 條評論