Sei sulla pagina 1di 36

Decision Trees and

Random Forests
Dr. Debdoot Sheet
Principal Investigator, Kharagpur Learning, Imaging and Visualization Group
Assistant Professor, Department of Electrical Engineering
Indian Institute of Technology Kharagpur

www.facweb.iitkgp.ernet.in/~debdoot/
NOT ABOUT WALKING IN A
FOREST

Decision Trees and Random Forests [Debdoot Sheet] 2


IS ALL ABOUT

Decision Trees and Random Forests [Debdoot Sheet] 3


Overview
• Historical Perspective
• Decision Tree
• Random Forest
• Computational Complexity
• Variable Importance

Decision Trees and Random Forests [Debdoot Sheet] 4


Historical Perspective
Decision Trees Random Forests
• L. Breiman, J. Friedman, C. J. • Y. Amit and D. Geman., “Shape
Stone, and R. A. Olshen, quantization and recognition
Classification and Regression with randomized trees,” Neural
Trees. Chapman and Hall/CRC Computation, vol. 9, pp. 1545–
1588, 1997.
(SIAM), 1984.
• T. K. Ho, “The random
• J. R. Quinlan, C4.5: Programs subspace method for
for Machine Learning. 1993. constructing decision forests,”
IEEE T-‐PAMI, vol. 20, no. 8, pp.
832–844, 1998.
• L. Breiman, “Random forests,”
Machine Learning, vol. 45, no.
1, pp. 5–32, 2001.
Decision Trees and Random Forests [Debdoot Sheet] 5
DECISION TREE

Decision Trees and Random Forests [Debdoot Sheet] 6


Problem Statement

Formica  rufa (Red  wood  ant)


Decision Trees and Random Forests [Debdoot Sheet] 7
Classification vs. Regression

Decision Trees and Random Forests [Debdoot Sheet] 8


Decision Tree

Decision Trees and Random Forests [Debdoot Sheet] 9


Forming a Decision Tree

Decision Trees and Random Forests [Debdoot Sheet] 10


Step 1: Split Function at Node

Axis  aligned   split Oblique  split Polynomial   split

Decision Trees and Random Forests [Debdoot Sheet] 11


Step 2: Assessing Purity of Split

Decision Trees and Random Forests [Debdoot Sheet] 12


Cost function for Split Purity
Entropy  of  class  distribution

Information  Gain

Decision Trees and Random Forests [Debdoot Sheet] 13


Step 3: Selecting Optimum Split
𝑥 (#) 𝑥 (%) 𝑥 (&) 𝑥 (')
f1
f2

Max.  info.  gain

fn

Decision Trees and Random Forests [Debdoot Sheet] 14


Step 4: Stopping Criteria

Decision Trees and Random Forests [Debdoot Sheet] 15


Step 5: Leaf Prediction Model

Decision Trees and Random Forests [Debdoot Sheet] 16


Deploying a Decision Tree

Decision Trees and Random Forests [Debdoot Sheet] 17


RANDOM FOREST

Decision Trees and Random Forests [Debdoot Sheet] 18


Growing Multiple Trees in a Forest

Bagging  – Bootstrapped  Aggregation


Decision Trees and Random Forests [Debdoot Sheet] 19
Ensemble Prediction Model

Decision Trees and Random Forests [Debdoot Sheet] 20


What do we gain by using a Forest?

Decision Trees and Random Forests [Debdoot Sheet] 21


Noise Resilience and Topology
Independence

Decision Trees and Random Forests [Debdoot Sheet] 22


Effect of Tree Depth

Decision Trees and Random Forests [Debdoot Sheet] 23


Effect of Split Function

Decision Trees and Random Forests [Debdoot Sheet] 24


Classification Margin

Decision Trees and Random Forests [Debdoot Sheet] 25


Random Forest vs. AdaBoost

Decision Trees and Random Forests [Debdoot Sheet] 26


Random Forest vs. SVM

Decision Trees and Random Forests [Debdoot Sheet] 27


Regression Forest

Decision Trees and Random Forests [Debdoot Sheet] 28


Manifold Forest

Decision Trees and Random Forests [Debdoot Sheet] 29


Gaming – Kinect for Xbox 360

Depth  map Body  part  classification

J. Shotton, A. Fitzgibbon, M. Cook, T. Sharp, M. Finocchio, R. Moore, A. Kipman, and A. Blake,


“Real-time human pose recognition in parts from a single depth image,” in Proc. CVPR, 2011.
Decision Trees and Random Forests [Debdoot Sheet] 30
ENGINEERING DESIGN
PERSPECTIVE

Decision Trees and Random Forests [Debdoot Sheet] 31


Understanding Computations

Decision Trees and Random Forests [Debdoot Sheet] 32


Computational Complexity
Training Complexity Testing Complexity

Decision Trees and Random Forests [Debdoot Sheet] 33


Features and their Role
Feature  2

Feature  1
Decision Trees and Random Forests [Debdoot Sheet] 34
Variable Importance

Genuer, R., Poggi, J.-M.,


Tuleau-Malot, C., (2010).
Variable selection using
random forests. Pat. Recog.
Letters. 31(14):2225-2236

Decision Trees and Random Forests [Debdoot Sheet] 35


Take Home Message
• Reading • Toolboxes and Packages
– L. Breiman, J. Friedman, C. J. – randomForest in R
Stone, and R. A. Olshen, – TreeBagger in Matlab
Classification and Regression – sklearn.ensemble.RandomFo
Trees. Chapman and restClassifier in Python-
Hall/CRC, 1984. Scikit-learn
– L. Breiman, “Random forests,”
Machine Learning, vol. 45, • Conferences
no. 1, pp. 5–32, 2001. – Int. Conf. Comp. Vis. (ICCV)
– A. Criminisi and J. Shotton, – Eur. Conf. Comp. Vis. (ECCV)
Decision Forests for – Asian Conf. Comp. Vis.
Computer Vision and Medical (ACCV)
Image Analysis, Springer, – Comp. Vis. Patt. Recog.
2013. (CVPR)
– Med. Image Comp., Comp.
Assist. Interv. (MICCAI)

Decision Trees and Random Forests [Debdoot Sheet] 36

Potrebbero piacerti anche