This is a MATLAB wrapper for doing classification using the decision forest framework [1] available at [http://research.microsoft.com/en-us/projects/decisionforests/] (http://research.microsoft.com/en-us/projects/decisionforests/) , hereinafter referred to as Sherwood.
Training and classification is parallelized.
-
MATLAB and a c++ compiler is needed.
-
Due to the license of Sherwood, you will have to download the source code and place it inside /Sherwood/.
-
Setup MATLAB using "mex -setup".
-
An example is available in example.m
All files are compiled automatically
The code has been tested on
- MATLAB 2013a with GCC 4.8 on Ubuntu 13.10.
- MATLAB 2013a with Visual Studio 2013 on Windows 7.
If you are using a c++ compiler which does not support OpenMP http://openmp.org/wp/openmp-compilers/, you need to turn off multi-threaded training by setting "use_openmp = false" in sherwood_train.m.
OpenMP is unfortunately not supported by the c++ compiler recommended by Mathworks for Windows: Microsoft Windows SDK 7.1. It is however supported by Visual Studio.
There are atleast two popular implementation of random forest available for MATLAB [2,3].
The main difference with Sherwood are
- No bagging, so there will be no out-of-bag error et cetera.
- The probabilities in the leafs are stored as histograms resulting in more accurate probability estimates when averaging over many trees.
- Entropy is used as split critera for each node.
Antonio Criminisi, Jamie Shotton, and Ender Konukoglu [Decision Forests: A Unified Framework for Classification, Regression, Density Estimation, Manifold Learning and Semi-Supervised Learning] (http://research.microsoft.com/apps/pubs/default.aspx?id=158806). Foundations and Trends® in Computer Graphics and Vision, 2012.
-
Randomforest-matlab, a Matlab wrapper of a R wrapper of Leo Breiman fortran code https://code.google.com/p/randomforest-matlab/.
-
Matlab's tree bagger http://www.mathworks.se/help/stats/treebagger.html.