This is a MATLAB wrapper for doing classification using the decision forest framework [1] available at 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.
-
Decision Forests: A Unified Framework for Classification, Regression, Density Estimation, Manifold Learning and Semi-Supervised Learning
Foundations and Trends® in Computer Graphics and Vision, 2012.
Antonio Criminisi, Jamie Shotton, and Ender Konukoglu. -
Randomforest-matlab
A Matlab wrapper of a R wrapper of Leo Breiman's fortran code. -
Tree bagger
Matlab's own random forest variation.