Randomforest Example

create dataset, grow trees, classifying data and visualization
2.8K Downloads
Updated 29 Oct 2013

View License

randomforest example

based on Shotton et al., Real-time human pose recognition in parts from single depth images, CVPR,2011

files:
1. makeclick.m -- to make dataset by clicking
2. makespiral.m --to make dataset by using a spiral function
3. rt1.m --main script for growing the forest
4. branch.m --class of each branch of a tree for growing a tree
5. sbranch.m --class of each branch with smaller size of memory for classifying
6. show.m --show classified data elements
7. intermap.m --flat shading to represent areas of classes
8. flatmap.m --flat shading to represent areas of classes

This example includes dataset generator by
-clicking (makeclick.m)
-and using a spiral function (makespiral.m).

The dataset is saved into data.mat.

Once the dataset is ready use a script rt1.m to grow your randomforest.
Each random tree is save in treexx.mat.
Therefore, we can classify an unknown data by using scripts:
-show.m --colored markers
-intermap.m --flat shading to represent areas of classes
-flatmap.m --flat shading to represent areas of classes

enjoy your randomforest!

Wasit Limprasert
email:wasit7@gmail.com

Cite As

Wasit Limprasert (2024). Randomforest Example (https://www.mathworks.com/matlabcentral/fileexchange/44121-randomforest-example), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2011a
Compatible with any release
Platform Compatibility
Windows macOS Linux

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
Version Published Release Notes
1.0.0.0