Random-Forest-Matlab-master

所属分类:图形图像处理
开发工具:matlab
文件大小:43KB
下载次数:178
上传日期:2014-04-15 00:48:05
上 传 者yuanpengli123
说明:  随机森林用于 图像处理matalab 代码
(Random Forest matalab code for image processing)

文件列表:
data\lenna.jpg (20401, 2014-02-27)
demos\forestdemo.m (3144, 2014-02-27)
demos\forestTest.m (649, 2014-02-27)
demos\forestTrain.m (1780, 2014-02-27)
demos\localContrastNormalize.m (1591, 2014-02-27)
demos\mgd.m (2414, 2014-02-27)
demos\storage.m (111, 2014-02-27)
demos\svmdemo.m (1823, 2014-02-27)
demos\svmTest.m (687, 2014-02-27)
demos\svmTrain.m (3331, 2014-02-27)
demos\treeTest.m (1568, 2014-02-27)
demos\treeTrain.m (1627, 2014-02-27)
demos\weakTest.m (1087, 2014-02-27)
demos\weakTrain.m (5637, 2014-02-27)
lib\forestTest.m (649, 2014-02-27)
lib\forestTrain.m (1780, 2014-02-27)
lib\localContrastNormalize.m (1591, 2014-02-27)
lib\mgd.m (2414, 2014-02-27)
lib\storage.m (111, 2014-02-27)
lib\svmTest.m (687, 2014-02-27)
lib\svmTrain.m (3331, 2014-02-27)
lib\treeTest.m (1568, 2014-02-27)
lib\treeTrain.m (1627, 2014-02-27)
lib\weakTest.m (1087, 2014-02-27)
lib\weakTrain.m (5637, 2014-02-27)
data (0, 2014-02-27)
demos (0, 2014-04-14)
lib (0, 2014-02-27)

Random Forest for Matlab This toolbox was written for my own education and to give me a chance to explore the models a bit. It is NOT intended for any serious applications and it does not NOT do many of things you would want a mature implementation to do, like leaf pruning. If you wish to use a strong implementation I recommend Scikit Learn / Python. For Matlab I do not really have a recommendation. --------------------------------------------------------------------------- Usage: Random Forests for classification: (see demo for more) opts.classfierID= [2, 3]; % use both 2D-linear weak learners (2) and conic (3) m= forestTrain(X, Y, opts); yhat = forestTest(m, X); fprintf('Training accuracy = %.2f\n', mean(yhat==Y)); --------------------------------------------------------------------------- More info: Currently contains random forests. The Random Forest code is not industrial strength implementation. Inspired by MSR's recent work on Random Forests: https://research.microsoft.com/apps/pubs/default.aspx?id=155552 See http://cs.stanford.edu/~karpathy/randomForestSpiral.png for results on spiral using 2-D linear weak learners. (Code that generates the image is in forestdemo.m) --------------------------------------------------------------------------- Adding your own weak learners in Ranfom Forests: It is fairly easy to add your own weak learners. Modify: weakTrain.m: add another elseif statement for classf variable, and put in code for your weak learner. Store all variables you need during test time in modelCandidate weakTest.m: add another elseif for your classifier, and implement the decision procedure, using variables you stored inside model. Now just include your new classifier when setting opts.classfierID! --------------------------------------------------------------------------- BSD Licence.

近期下载者

相关文件


收藏者