Decision Tree and Random Forest Implementations for fast Fitlering - - PowerPoint PPT Presentation

decision tree and random forest implementations for fast
SMART_READER_LITE
LIVE PREVIEW

Decision Tree and Random Forest Implementations for fast Fitlering - - PowerPoint PPT Presentation

Decision Tree and Random Forest Implementations for fast Fitlering of Sensor Data Sebastian Buschj ager and Katharina Morik TU Dortmund University - Computer Science - Artificial Intelligence Group July 3, 2018 1 So... Distributed


slide-1
SLIDE 1

Decision Tree and Random Forest Implementations for fast Fitlering of Sensor Data

Sebastian Buschj¨ ager and Katharina Morik

TU Dortmund University - Computer Science - Artificial Intelligence Group

July 3, 2018

1

slide-2
SLIDE 2

So... Distributed computation hype?

1991 Ubiquitous Computing 1999 Internet of Things 2015 Edge Computing / Fog Computing

Decision Tree and Random Forest Implementations for fast Fitlering of Sensor Data 2

slide-3
SLIDE 3

Machine Learning for small devices

Fact We measure a lot of data Thus We need to transmit and analyze a lot of data

Decision Tree and Random Forest Implementations for fast Fitlering of Sensor Data 3

slide-4
SLIDE 4

Machine Learning for small devices

Fact We measure a lot of data Thus We need to transmit and analyze a lot of data Idea Use Machine Learning locally to decide which data is useful Thus Continuously apply ML model in realtime on small devices

Decision Tree and Random Forest Implementations for fast Fitlering of Sensor Data 3

slide-5
SLIDE 5

Random Forest

Fact Random Forest is one of the best performing ML model Often We design ML models independently from application

Decision Tree and Random Forest Implementations for fast Fitlering of Sensor Data 4

slide-6
SLIDE 6

Random Forest

Fact Random Forest is one of the best performing ML model Often We design ML models independently from application What system is needed for a given tree / forest? What is the best way to implement a Decision Tree?

Decision Tree and Random Forest Implementations for fast Fitlering of Sensor Data 4

slide-7
SLIDE 7

Decision Tree

Inner nodes make decision xi < t Leaf nodes make prediction y

2 6 12 11 0.15 0.85 5 10 9 0.1 0.9 0.2 0.8 1 4 3 8 7 0.25 0.75 0.4 0.6 0.3 0.7

Decision Tree and Random Forest Implementations for fast Fitlering of Sensor Data 5

slide-8
SLIDE 8

Decision Tree

Inner nodes make decision xi < t Leaf nodes make prediction y

2 6 12 11 0.15 0.85 5 10 9 0.1 0.9 0.2 0.8 1 4 3 8 7 0.25 0.75 0.4 0.6 0.3 0.7

Observation Some path in tree have higher frequency than others

Decision Tree and Random Forest Implementations for fast Fitlering of Sensor Data 5

slide-9
SLIDE 9

Probabilistic Analysis of Decision Trees

Idea Each decision is a Bernoulli Experiment with probability pi→j

Decision Tree and Random Forest Implementations for fast Fitlering of Sensor Data 6

slide-10
SLIDE 10

Probabilistic Analysis of Decision Trees

Idea Each decision is a Bernoulli Experiment with probability pi→j Path probability p(π) = pπ0→π1 · . . . · pπL−1→πL

Decision Tree and Random Forest Implementations for fast Fitlering of Sensor Data 6

slide-11
SLIDE 11

Probabilistic Analysis of Decision Trees

Idea Each decision is a Bernoulli Experiment with probability pi→j Path probability p(π) = pπ0→π1 · . . . · pπL−1→πL Expected no. of comparisons E[L] =

  • π

p(π) · |π|

Decision Tree and Random Forest Implementations for fast Fitlering of Sensor Data 6

slide-12
SLIDE 12

Probabilistic Analysis of Decision Trees

Idea Each decision is a Bernoulli Experiment with probability pi→j Path probability p(π) = pπ0→π1 · . . . · pπL−1→πL Expected no. of comparisons E[L] =

  • π

p(π) · |π| Idea Use expected no. of comparisons to estimate runtime

Decision Tree and Random Forest Implementations for fast Fitlering of Sensor Data 6

slide-13
SLIDE 13

There are many ways to implement a Decision Tree

For Example: NativeTree bool predict(short const * x){ unsigned int i = 0; while(!tree[i].isLeaf) { if (x[tree[i].f] <= tree[i].split) { i = tree[i].left; } else { i = tree[i].right; } } return tree[i].prediction; }

Decision Tree and Random Forest Implementations for fast Fitlering of Sensor Data 7

slide-14
SLIDE 14

There are many ways to implement a Decision Tree

For Example: If-Else-Tree

bool predict(short const * x){ if(x[0] <= 8191){ if(x[1] <= 2048){ return true; } else { return false; } } else { if(x[2] <= 512){ return true; } else { return false; } } }

Decision Tree and Random Forest Implementations for fast Fitlering of Sensor Data 8

slide-15
SLIDE 15

There are many ways to implement a Decision Tree

For Example: Vectorized Tree bool predict(short const * x){ unsigned int i = 0; unsigned int mask; void * tmp; while(!tree[i].isLeaf) { load_vectorized(tree[i],tmp); mask = compare_vectorized(tmp, x); i = mask_to_index(mask); } return tree[i].prediction; }

Decision Tree and Random Forest Implementations for fast Fitlering of Sensor Data 9

slide-16
SLIDE 16

Results So which one is the best? And when? Come visit me at my poster and find out!

Decision Tree and Random Forest Implementations for fast Fitlering of Sensor Data 10