O'Reilly logo

Ensemble Machine Learning by Ankit Dixit

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Tree building

We have all the required ingredients in our hand to create a decision tree, so what are we waiting for? Let's start our own decision tree to get an understanding of its working; we will create a toy dataset for RGB pixel values to build a tree. Our target is to segment out two different color pixel values:

SN

RED

GREEN

BLUE

CLASS

1

0.61

0.31

0.54

0

2

0.29

0.03

0.24

1

3

0.66

0.39

0.61

0

4

0.32

0.07

0.29

1

5

0.64

0.35

0.58

0

6

0.67

0.36

0.59

0

7

0.40

0.12

0.35

1

8

0.69

0.38

0.60

0

9

0.25

0.03

0.24

1

10

0.48

0.19

0.41

0

Table 3.4 RGB pixel values

However, before we go ahead and build our tree, ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required